mirror of https://git.48k.eu/ogclient
Include the poweroff support in ogOperation
This new patch allows us to turn off the linux machine using poweroff binary or in OpenGnsys client case, use the specific script.more_events
parent
6479530bf5
commit
62a8ca4cd8
|
@ -1,5 +1,11 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
def poweroff():
|
||||
print 'APAGADO'
|
||||
if os.path.exists('/scripts/oginit'):
|
||||
subprocess.call('source /opt/opengnsys/etc/preinit/loadenviron.sh; /opt/opengnsys/scripts/poweroff', shell=True)
|
||||
else:
|
||||
subprocess.call(['/sbin/poweroff'])
|
||||
|
||||
def reboot():
|
||||
print 'REBOOT'
|
||||
|
|
Loading…
Reference in New Issue