From 9fcef552cc51f5db7c5eebfec194852309c9afbd Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 27 Nov 2019 18:32:39 +0000 Subject: [PATCH] Added sudo to shutdown calls --- openflexure_microscope/api/v2/blueprints/actions/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openflexure_microscope/api/v2/blueprints/actions/system.py b/openflexure_microscope/api/v2/blueprints/actions/system.py index 0b5bbd71..950af9fb 100644 --- a/openflexure_microscope/api/v2/blueprints/actions/system.py +++ b/openflexure_microscope/api/v2/blueprints/actions/system.py @@ -15,7 +15,7 @@ class ShutdownAPI(MicroscopeView): .. :quickref: Actions; Shutdown """ - subprocess.Popen(["shutdown", "-h", "now"]) + subprocess.Popen(["sudo", "shutdown", "-h", "now"]) return "{}", 201 @@ -32,6 +32,6 @@ class RebootAPI(MicroscopeView): .. :quickref: Actions; Shutdown """ - subprocess.Popen(["shutdown", "-r", "now"]) + subprocess.Popen(["sudo", "shutdown", "-r", "now"]) return "{}", 201