From 51692795c67148f17e8c9c4ca8a151c8ce9c137c Mon Sep 17 00:00:00 2001 From: Joel Collins <2579603-jtc42@users.noreply.gitlab.com> Date: Tue, 11 Feb 2020 17:31:11 +0000 Subject: [PATCH] Revert "Fixed rebooting for openflexure-ws user" This reverts commit 72af35e4aeb851b7705bc5e74bf706268b7492b5 --- openflexure_microscope/api/v2/views/actions/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openflexure_microscope/api/v2/views/actions/system.py b/openflexure_microscope/api/v2/views/actions/system.py index 38cc3c5c..631c5c79 100644 --- a/openflexure_microscope/api/v2/views/actions/system.py +++ b/openflexure_microscope/api/v2/views/actions/system.py @@ -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