Username
This commit is contained in:
parent
5d9b8db783
commit
1c91882710
|
@ -118,19 +118,19 @@ fi
|
|||
|
||||
if [ ${#CURR_PASSWORD} -eq 0 ]; then
|
||||
# retrieve password
|
||||
if [ ! -f ~/.passwords/$CURR_USER/$CURR_APP ]; then
|
||||
if [ ! -f ~/.passwords/$CURR_USERNAME/$CURR_APP ]; then
|
||||
echo ""
|
||||
exit 4
|
||||
else
|
||||
gpg -dq --passphrase "$MASTER_PASSWORD" ~/.passwords/$CURR_USER/$CURR_APP
|
||||
gpg -dq --passphrase "$MASTER_PASSWORD" ~/.passwords/$CURR_USERNAME/$CURR_APP
|
||||
fi
|
||||
else
|
||||
# store password
|
||||
if [ ! -d ~/.passwords/$CURR_USER ]; then
|
||||
mkdir -p ~/.passwords/$CURR_USER
|
||||
if [ ! -d ~/.passwords/$CURR_USERNAME ]; then
|
||||
mkdir -p ~/.passwords/$CURR_USERNAME
|
||||
fi
|
||||
echo “$CURR_PASSWORD” | gpg -ca --cipher-algo AES256 --passphrase "$MASTER_PASSWORD" > ~/.passwords/$CURR_USER/$CURR_APP
|
||||
if [ ! -f ~/.passwords/$CURR_USER/$CURR_APP ]; then
|
||||
echo “$CURR_PASSWORD” | gpg -ca --cipher-algo AES256 --passphrase "$MASTER_PASSWORD" > ~/.passwords/$CURR_USERNAME/$CURR_APP
|
||||
if [ ! -f ~/.passwords/$CURR_USERNAME/$CURR_APP ]; then
|
||||
exit 5
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue