Check for empty string
This commit is contained in:
parent
3bc378f2a2
commit
0c4744efe4
|
@ -7556,6 +7556,9 @@ function configure_backup_key {
|
|||
|
||||
# Generate a GPG key for backups
|
||||
BACKUP_KEY_EXISTS=$(su -c "gpg --list-keys \"$MY_NAME (backup key)\"" - $MY_USERNAME)
|
||||
if [ ! $BACKUP_KEY_EXISTS ]; then
|
||||
BACKUP_KEY_EXISTS='error'
|
||||
fi
|
||||
if [ $BACKUP_KEY_EXISTS == *"error"* ]; then
|
||||
echo 'Key-Type: 1' > /home/$MY_USERNAME/gpg-genkey.conf
|
||||
echo 'Key-Length: 4096' >> /home/$MY_USERNAME/gpg-genkey.conf
|
||||
|
|
Loading…
Reference in New Issue