diff --git a/openflexure_microscope/api/v2/views/actions/system.py b/openflexure_microscope/api/v2/views/actions/system.py index 631c5c79..38cc3c5c 100644 --- a/openflexure_microscope/api/v2/views/actions/system.py +++ b/openflexure_microscope/api/v2/views/actions/system.py @@ -25,7 +25,7 @@ class ShutdownAPI(View): """ Attempt to shutdown the device """ - subprocess.Popen(["sudo", "shutdown", "-h", "now"]) + subprocess.Popen(["shutdown", "-h", "now"]) return "{}", 201 @@ -41,6 +41,6 @@ class RebootAPI(View): """ Attempt to reboot the device """ - subprocess.Popen(["sudo", "shutdown", "-r", "now"]) + subprocess.Popen(["systemctl", "reboot", "-i"]) return "{}", 201