Added sqlDetails parameter check
This commit is contained in:
parent
48d06eaa58
commit
3b72240d8c
10
backup.sh
10
backup.sh
@ -256,6 +256,16 @@ elif [ -n "$webUser" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## Ensure sqlDetails file exists
|
||||||
|
if [ ! -f "$sqlDetails" ]; then
|
||||||
|
echo -e "\n${err}The file containing your SQL details does not exist" \
|
||||||
|
"(-s parameter)${normal}\n"
|
||||||
|
exit 1
|
||||||
|
elif [ ! -s "$sqlDetails" ]; then
|
||||||
|
echo -e "\n${err}The file containing your SQL details is empty.${normal}\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
### Log start of script operations
|
### Log start of script operations
|
||||||
echo -e "\e[1;35m${stamp}-- Start $scriptName execution ---${normal}" \
|
echo -e "\e[1;35m${stamp}-- Start $scriptName execution ---${normal}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user