quoted webuser variable in ncMain fcn to prevent globbing

This commit is contained in:
Asif Bacchus 2018-10-03 12:59:06 -06:00
parent ed77963bd0
commit b7a04a9422
1 changed files with 2 additions and 2 deletions

View File

@ -74,14 +74,14 @@ function ncMaint {
if [ "$1" = "on" ]; then
echo -e "${info}${stamp} -- [INFO] Putting NextCloud in maintenance" \
"mode --${normal}" >> "$logFile"
su -c "php ${ncRoot}/occ maintenance:mode --on" - ${webUser} \
su -c "php ${ncRoot}/occ maintenance:mode --on" - "${webUser}" \
>> "$logFile" 2>&1
maintResult="$?"
return "$maintResult"
elif [ "$1" = "off" ]; then
echo -e "${info}${stamp} -- [INFO] Exiting NextCloud maintenance" \
"mode --${normal}" >> "$logFile"
su -c "php ${ncRoot}/occ maintenance:mode --off" - ${webUser} \
su -c "php ${ncRoot}/occ maintenance:mode --off" - "${webUser}" \
>> "$logFile" 2>&1
maintResult="$?"
return "$maintResult"