Allow password storage for root

So that local database backups are unaffected
This commit is contained in:
Bob Mottram 2016-11-23 12:38:07 +00:00
parent 98ed130c1b
commit ba3be6aab5
1 changed files with 3 additions and 1 deletions

View File

@ -247,7 +247,9 @@ if [ ${#CURR_PASSWORD} -eq 0 ]; then
else
# store password
if [ -f $NO_PASSWORD_STORE_FILE ]; then
exit 0
if [[ "$CURR_USERNAME" != 'root' ]]; then
exit 0
fi
fi
if [ ! -d ~/.passwords/$CURR_USERNAME ]; then
mkdir -p ~/.passwords/$CURR_USERNAME