From b446dc05b3e7decc6c1c26cdce768747f52d02b0 Mon Sep 17 00:00:00 2001 From: DecaTec Date: Sat, 5 Jan 2019 09:22:47 +0100 Subject: [PATCH] check args --- NextcloudRestore.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NextcloudRestore.sh b/NextcloudRestore.sh index 3903e8a..fabd463 100644 --- a/NextcloudRestore.sh +++ b/NextcloudRestore.sh @@ -21,7 +21,7 @@ backupMainDir=$2 if [ -z "$backupMainDir" ]; then # TODO: The directory where you store the Nextcloud backups (when not specified by args) - backupMainDir="/mnt/hdd1/nextcloudb_ackups" + backupMainDir="/mnt/hdd1/nextcloudb_backup" fi echo "Backup directory: $backupMainDir" @@ -70,10 +70,10 @@ errorecho() { cat <<< "$@" 1>&2; } # # Check if parameter given # -if [ $# != "1" ] +if [ $# != "1" ] | [ $# != "2" ] then errorecho "ERROR: No backup name to restore given!" - errorecho "Usage: NextcloudRestore.sh 'BackupDate'" + errorecho "Usage: NextcloudRestore.sh 'BackupDate' ['BackupDirectory']" exit 1 fi -- 2.34.1