Updated sqlDetails check to use checkExist
This commit is contained in:
parent
75bd10e6c0
commit
3db1773e65
10
backup.sh
10
backup.sh
@ -257,15 +257,17 @@ elif [ -n "$webUser" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## Ensure sqlDetails file exists
|
## Ensure sqlDetails file exists
|
||||||
if [ ! -f "$sqlDetails" ]; then
|
checkExist ff "$sqlDetails"
|
||||||
|
checkResult="$?"
|
||||||
|
if [ "$checkResult" = "1" ]; then
|
||||||
|
# sqlDetails file cannot be found
|
||||||
echo -e "\n${err}The file containing your SQL details does not exist" \
|
echo -e "\n${err}The file containing your SQL details does not exist" \
|
||||||
"(-s parameter)${normal}\n"
|
"(-s parameter)${normal}\n"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ ! -s "$sqlDetails" ]; then
|
|
||||||
echo -e "\n${err}The file containing your SQL details is empty.${normal}\n"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "using $sqlDetails"
|
||||||
|
exit 99
|
||||||
|
|
||||||
### 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