From 4ef7d86828c78d3353706be4597afbdb425a5ebe Mon Sep 17 00:00:00 2001 From: paukstelis Date: Sat, 11 Jun 2022 13:20:12 -0400 Subject: [PATCH] execute as user --- octoprint_deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 5383456..21da3b7 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -636,7 +636,7 @@ prepare () { fi if [ $INSTALL -eq 1 ]; then - OCTOEXEC=/home/$user/oprint/bin/octoprint + OCTOEXEC=sudo -u $user /home/$user/oprint/bin/octoprint echo 'type: octopi' >> /etc/octoprint_deploy if prompt_confirm "Would you like to install and use ustreamer instead of mjpg-streamer?"; then echo 'streamer: ustreamer' >> /etc/octoprint_deploy @@ -668,7 +668,7 @@ prepare () { fi if [ $INSTALL -gt 1 ]; then - OCTOEXEC=/home/$user/OctoPrint/bin/octoprint + OCTOEXEC=sudo -u $user /home/$user/OctoPrint/bin/octoprint echo 'type: linux' >> /etc/octoprint_deploy echo "Creating OctoBuntu installation equivalent." echo "Adding systemctl and reboot to sudo"