Stating PATH in the same subprocess call
parent
c7fd729504
commit
12fdbf4f9d
|
@ -113,12 +113,12 @@ class EnclosureReader(Thread):
|
|||
subprocess.call('speaker-test -P 10 -l 0 -s 1', shell=True)
|
||||
|
||||
if "unit.shutdown" in data:
|
||||
subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin', shell=True)
|
||||
subprocess.call('sudo poweroff', shell=True)
|
||||
subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin'
|
||||
' && sudo poweroff', shell=True)
|
||||
|
||||
if "unit.reboot" in data:
|
||||
subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin', shell=True)
|
||||
subprocess.call('sudo reboot', shell=True)
|
||||
subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin'
|
||||
' && sudo reboot', shell=True)
|
||||
|
||||
if "unit.setwifi" in data:
|
||||
self.client.emit(Message("wifisetup.start"))
|
||||
|
|
Loading…
Reference in New Issue