Fixed rebooting for openflexure-ws user
This commit is contained in:
parent
ede9fcbf2b
commit
72af35e4ae
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ class ShutdownAPI(View):
|
||||||
"""
|
"""
|
||||||
Attempt to shutdown the device
|
Attempt to shutdown the device
|
||||||
"""
|
"""
|
||||||
subprocess.Popen(["sudo", "shutdown", "-h", "now"])
|
subprocess.Popen(["shutdown", "-h", "now"])
|
||||||
|
|
||||||
return "{}", 201
|
return "{}", 201
|
||||||
|
|
||||||
|
|
@ -41,6 +41,6 @@ class RebootAPI(View):
|
||||||
"""
|
"""
|
||||||
Attempt to reboot the device
|
Attempt to reboot the device
|
||||||
"""
|
"""
|
||||||
subprocess.Popen(["sudo", "shutdown", "-r", "now"])
|
subprocess.Popen(["systemctl", "reboot", "-i"])
|
||||||
|
|
||||||
return "{}", 201
|
return "{}", 201
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue