Revert "Fixed rebooting for openflexure-ws user"

This reverts commit 72af35e4ae
This commit is contained in:
Joel Collins 2020-02-11 17:31:11 +00:00
parent 72af35e4ae
commit 51692795c6

View file

@ -25,7 +25,7 @@ class ShutdownAPI(View):
"""
Attempt to shutdown the device
"""
subprocess.Popen(["shutdown", "-h", "now"])
subprocess.Popen(["sudo", "shutdown", "-h", "now"])
return "{}", 201
@ -41,6 +41,6 @@ class RebootAPI(View):
"""
Attempt to reboot the device
"""
subprocess.Popen(["systemctl", "reboot", "-i"])
subprocess.Popen(["sudo", "shutdown", "-r", "now"])
return "{}", 201