From b7a04a9422a28e9b17999e659ad50bc547fc30df Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Wed, 3 Oct 2018 12:59:06 -0600 Subject: [PATCH] quoted webuser variable in ncMain fcn to prevent globbing --- backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 3d51aa0..bbec974 100755 --- a/backup.sh +++ b/backup.sh @@ -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"