Changed ncMaint to use sudo instead of su to allow non-interactive accts
This commit is contained in:
parent
71507b1341
commit
15d2db16bd
@ -142,7 +142,7 @@ function checkExist {
|
|||||||
|
|
||||||
### ncMaint - pass requested mode change type to NextCloud occ
|
### ncMaint - pass requested mode change type to NextCloud occ
|
||||||
function ncMaint {
|
function ncMaint {
|
||||||
su -c "php ${ncRoot}/occ maintenance:mode --$1" - "${webUser}" \
|
sudo -u ${webUser} php ${ncroot}/occ maintenance:mode --$1 \
|
||||||
>> "$logFile" 2>&1
|
>> "$logFile" 2>&1
|
||||||
maintResult="$?"
|
maintResult="$?"
|
||||||
return "$maintResult"
|
return "$maintResult"
|
||||||
|
Loading…
Reference in New Issue
Block a user