Commit 72af35e4 authored by Joel Collins's avatar Joel Collins
Browse files

Fixed rebooting for openflexure-ws user

parent ede9fcbf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ class ShutdownAPI(View):
        """
        Attempt to shutdown the device
        """
        subprocess.Popen(["sudo", "shutdown", "-h", "now"])
        subprocess.Popen(["shutdown", "-h", "now"])

        return "{}", 201

@@ -41,6 +41,6 @@ class RebootAPI(View):
        """
        Attempt to reboot the device
        """
        subprocess.Popen(["sudo", "shutdown", "-r", "now"])
        subprocess.Popen(["systemctl", "reboot", "-i"])

        return "{}", 201