pre-req: seafile program dir

This commit is contained in:
Asif Bacchus 2019-05-19 00:33:17 -06:00
parent a52d3ace09
commit 1330cc8e70

View File

@ -383,7 +383,7 @@ while getopts ':5:b:d:l:p:s:u:v:w:' PARAMS; do
done done
### Verify script pre-requisties ### Verify script pre-requisites
## If not running as root, display error on console and exit ## If not running as root, display error on console and exit
if [ $(id -u) -ne 0 ]; then if [ $(id -u) -ne 0 ]; then
@ -391,20 +391,20 @@ if [ $(id -u) -ne 0 ]; then
exit 3 exit 3
fi fi
## Check Seafile webroot ## Check Seafile program directory
# Ensure Seafile webroot is provided # Ensure Seafile program directory is provided
if [ -z "$ncRoot" ]; then if [ -z "$seafDir" ]; then
echo -e "\n${err}The Seafile webroot must be specified (-n parameter)" \ echo -e "\n${err}The Seafile program directory must be specified" \
"${normal}\n" "(-p parameter)${normal}\n"
exit 1 exit 1
# Ensure Seafile webroot directory exists # Ensure Seafile program directory exists
elif [ -n "$ncRoot" ]; then else
checkExist fd "$ncRoot" checkExist fd "$seafDir"
checkResult="$?" checkResult="$?"
if [ "$checkResult" = "1" ]; then if [ "$checkResult" -eq 1 ]; then
# Specified Seafile webroot directory could not be found # Specified Seafile program directory could not be found
echo -e "\n${err}The provided Seafile webroot directory" \ echo -e "\n${err}The provided Seafile program directory" \
"(-n parameter) does not exist.${normal}\n" "(-p parameter) does not exist.${normal}\n"
exit 1 exit 1
fi fi
fi fi