mirror of https://git.48k.eu/ogclient
Add new process support for reboot message
parent
9eabc7f9a8
commit
fdf7701a03
|
@ -1,3 +1,6 @@
|
||||||
def poweroff():
|
def poweroff():
|
||||||
print 'APAGADO'
|
print 'APAGADO'
|
||||||
|
|
||||||
|
def reboot():
|
||||||
|
print 'REBOOT'
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,14 @@ class ogProcess():
|
||||||
def processOperation(self, op, URI):
|
def processOperation(self, op, URI):
|
||||||
if ("poweroff" in URI):
|
if ("poweroff" in URI):
|
||||||
self.process_poweroff()
|
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):
|
def process_poweroff(self):
|
||||||
# Powering off thread
|
# Powering off thread
|
||||||
|
|
Loading…
Reference in New Issue