diff options
author | Alvaro Neira Ayuso <aneira@soleta.eu> | 2019-12-12 18:15:09 +0100 |
---|---|---|
committer | Alvaro Neira Ayuso <alvaroneay@gmail.com> | 2020-01-19 19:50:44 +0100 |
commit | fdf7701a039b36beebb05296dbf28a10bd5588d2 (patch) | |
tree | 0fda1f39b6c40766f85b415223795d35010af923 /src | |
parent | 9eabc7f9a8933d3d3e88835173d45721c6ba3041 (diff) |
Add new process support for reboot message
Diffstat (limited to 'src')
-rw-r--r-- | src/linux/ogOperations.py | 3 | ||||
-rw-r--r-- | src/ogProcess.py | 8 |
2 files changed, 11 insertions, 0 deletions
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 |