Commit 9fcef552 authored by Joel Collins's avatar Joel Collins
Browse files

Added sudo to shutdown calls

parent fe3fb6e6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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