commit
73013b1c83
|
@ -59,17 +59,17 @@ PUSHOVER_DEVICE="{your-device}" # Multiple devices may be separated by a comma
|
||||||
# ****************************************************************************************************
|
# ****************************************************************************************************
|
||||||
|
|
||||||
function CHECK_INPUT_PARAM() {
|
function CHECK_INPUT_PARAM() {
|
||||||
if [ "$1" == "" ]; then
|
if [ $# -lt 1 ]; then
|
||||||
echo "Please specify the backup.zip file to be restored (e.g. "bash ./restore.sh /tmp/1-20200101-SharkJack-backup.zip")."
|
echo "Please specify the backup.zip file to be restored (e.g. "bash $0 /tmp/1-20200101-SharkJack-backup.zip")."
|
||||||
exit
|
exit
|
||||||
elif [ ! -f "$1" ]; then
|
elif [ ! -f "$1" ]; then
|
||||||
echo "$1 is not an existing file, please specify a backup.zip file to be restored (e.g. "bash ./restore.sh /tmp/1-20200101-SharkJack-backup.zip")."
|
echo "$1 is not an existing file, please specify a backup.zip file to be restored (e.g. "bash $0 /tmp/1-20200101-SharkJack-backup.zip")."
|
||||||
exit
|
exit
|
||||||
elif [ "${1##*.}" == "zip" ]; then
|
elif [ "${1##*.}" == "zip" ]; then
|
||||||
BACKUP_FILENAME=$(basename $1)
|
BACKUP_FILENAME=$(basename $1)
|
||||||
BACKUP_FILENAME=${BACKUP_FILENAME%.*}
|
BACKUP_FILENAME=${BACKUP_FILENAME%.*}
|
||||||
else
|
else
|
||||||
echo "$1 is not an zip file, please specify a backup.zip file to be restored (e.g. "bash ./restore.sh /tmp/1-20200101-SharkJack-backup.zip")."
|
echo "$1 is not an zip file, please specify a backup.zip file to be restored (e.g. "bash $0 /tmp/1-20200101-SharkJack-backup.zip")."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue