Added sudo to shutdown calls

This commit is contained in:
Joel Collins 2019-11-27 18:32:39 +00:00
parent fe3fb6e624
commit 9fcef552cc

View file

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