From a12a218e859e22faff40a718669fab1b111c4f07 Mon Sep 17 00:00:00 2001 From: Senad Uka Date: Wed, 8 Jun 2016 09:28:42 +0200 Subject: [PATCH] reboot canceling --- controller/state/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller/state/__init__.py b/controller/state/__init__.py index 727ef7e..141bb3b 100644 --- a/controller/state/__init__.py +++ b/controller/state/__init__.py @@ -30,8 +30,10 @@ def sync(): current_state = changer.process_change() server.post_state(current_state) + print " everything ok, canceling shutdown " + commands.getoutput('/sbin/shutdown -c') except: print " panicking safely ! " safely_panic() print " rebooting " - commands.getoutput('/sbin/shutdown -r now') + commands.getoutput('/sbin/shutdown -r +5')