diff --git a/bin/backuptool b/bin/backuptool index 80f8724..5c5f12a 100755 --- a/bin/backuptool +++ b/bin/backuptool @@ -373,9 +373,10 @@ done [ $# -gt 3 ] || [ $# -lt 1 ] && usage SERVICE=$2 -if [ $# -eq 3 ]; then +if [ $# -ge 3 ]; then PASSKEY=$2 SERVICE=$3 + BACKUPHOST=$4 fi if [ -f "/federated/bin/.gpg.backblaze" ]; then @@ -390,7 +391,7 @@ if [ -f "/etc/federated" ]; then [ -z "$B2_APPLICATION_KEY_ID" ] && failcheck "/etc/federated doesn't include B2_APPLICATION_KEY_ID for backups" [ -z "$B2_APPLICATION_KEY" ] && failcheck "/etc/federated doesn't include B2_APPLICATION_KEY for backups" [ -z "$DOMAIN" ] && failcheck "/etc/federated doesn't include DOMAIN for backups" - UUID=$(hostname) + [[ ! "$BACKUPHOST" ]] && UUID=$(hostname) || UUID="$BACKUPHOST" else failcheck "Could not find an /etc/federated file." fi