Changed ncMaint to use sudo instead of su to allow non-interactive accts

This commit is contained in:
Asif Bacchus 2018-10-16 09:25:45 -06:00
parent 71507b1341
commit 15d2db16bd
1 changed files with 4 additions and 4 deletions

View File

@ -142,10 +142,10 @@ function checkExist {
### ncMaint - pass requested mode change type to NextCloud occ
function ncMaint {
su -c "php ${ncRoot}/occ maintenance:mode --$1" - "${webUser}" \
>> "$logFile" 2>&1
maintResult="$?"
return "$maintResult"
sudo -u ${webUser} php ${ncroot}/occ maintenance:mode --$1 \
>> "$logFile" 2>&1
maintResult="$?"
return "$maintResult"
}
### cleanup - cleanup files and directories created by this script