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

View File

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