From 1d3b726213cdb910ff3176e1624da2d431077917 Mon Sep 17 00:00:00 2001 From: paukstelis Date: Mon, 28 Mar 2022 19:27:48 -0400 Subject: [PATCH] fix ubuntu sudoers --- octoprint_deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index c47929d..80b773b 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -496,6 +496,7 @@ prepare () { systemctl stop webcamd.service systemctl disable streamer_select.service systemctl stop streamer_select.service + echo "Adding systemctl and reboot to sudo" echo "$user ALL=NOPASSWD: /usr/bin/systemctl" >> /etc/sudoers.d/octoprint_systemctl echo "$user ALL=NOPASSWD: /usr/sbin/reboot" >> /etc/sudoers.d/octoprint_reboot #webcamd gets restarted? why? get it out of there for now @@ -506,8 +507,9 @@ prepare () { fi if [ $INSTALL -gt 1 ]; then echo "Creating OctoBuntu installation equivalent." - echo "$user ALL=(ALL) NOPASSWD:ALL /usr/bin/systemctl" >> /etc/sudoers.d/octoprint_systemctl - echo "$user ALL=(ALL) NOPASSWD:ALL /usr/sbin/reboot" >> /etc/sudoers.d/octoprint_reboot + echo "Adding systemctl and reboot to sudo" + echo "$user ALL=NOPASSWD: /usr/bin/systemctl" >> /etc/sudoers.d/octoprint_systemctl + echo "$user ALL=NOPASSWD: /usr/sbin/reboot" >> /etc/sudoers.d/octoprint_reboot echo "This will install necessary packages, download and install OctoPrint and setup a base instance on this machine." #install packages apt-get update > /dev/null