Added sudo to shutdown calls
This commit is contained in:
parent
fe3fb6e624
commit
9fcef552cc
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue