Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index 007c42a6..e69deb89 100755
--- a/update.sh
+++ b/update.sh
@@ -264,6 +264,10 @@ launch_script $1
EOF
chmod 700 /home/www/ncp-launcher.sh
+ # update sudoers permissions for the reboot command
+ grep -q reboot /etc/sudoers || \
+ sed -i 's|www-data.*|www-data ALL = NOPASSWD: /home/www/ncp-launcher.sh , /sbin/halt, /sbin/reboot|' /etc/sudoers
+
} # end - only live updates
exit 0