fix ubuntu sudoers

This commit is contained in:
paukstelis
2022-03-28 19:27:48 -04:00
parent 3b1457909b
commit 1d3b726213

View File

@@ -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