Fixed rebooting for openflexure-ws user

This commit is contained in:
Joel Collins 2020-02-11 17:04:11 +00:00
parent ede9fcbf2b
commit 72af35e4ae

View file

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