From fdf7701a039b36beebb05296dbf28a10bd5588d2 Mon Sep 17 00:00:00 2001 From: Alvaro Neira Ayuso Date: Thu, 12 Dec 2019 18:15:09 +0100 Subject: Add new process support for reboot message --- src/linux/ogOperations.py | 3 +++ src/ogProcess.py | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py index e11fb0d..d6795b1 100644 --- a/src/linux/ogOperations.py +++ b/src/linux/ogOperations.py @@ -1,3 +1,6 @@ def poweroff(): print 'APAGADO' +def reboot(): + print 'REBOOT' + diff --git a/src/ogProcess.py b/src/ogProcess.py index 35abb89..ff78f34 100644 --- a/src/ogProcess.py +++ b/src/ogProcess.py @@ -11,6 +11,14 @@ class ogProcess(): def processOperation(self, op, URI): if ("poweroff" in URI): self.process_poweroff() + elif ("reboot" in URI): + self.process_reboot() + + def process_reboot(self): + # Rebooting thread + def rebt(): + ogOperations.reboot() + threading.Thread(target=rebt).start() def process_poweroff(self): # Powering off thread -- cgit v1.2.3-18-g5258