File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ elif cmd == 'call':
170170 print (json .dumps (utils .generic_error (f'remote list failed' )))
171171
172172 elif action == 'registered-backup' :
173+ if os .path .exists (PASSPHRASE_PATH ):
174+ print (utils .validation_error ('passphrase' , 'missing' ))
173175 try :
174176 # create backup
175177 file_name = create_backup ()
Original file line number Diff line number Diff line change @@ -21,11 +21,12 @@ function send {
2121 # send encrypted backup
2222 gpg --batch -c --yes --passphrase-file $PASSPHRASE $BACKUP
2323 remote-backup upload " $BACKUP .gpg"
24+ mv $MD5 $MD5_LAST
2425 else
25- remote-backup upload " $BACKUP "
26+ # password not set, abort upload
27+ exit 4
2628 fi
2729 rm -f " $BACKUP " " $BACKUP .gpg"
28- mv $MD5 $MD5_LAST
2930 exit $?
3031}
3132
You can’t perform that action at this time.
0 commit comments