Stating PATH in the same subprocess call

pull/332/head
Arron Atchison 2016-08-17 12:53:49 -05:00
parent c7fd729504
commit 12fdbf4f9d
1 changed files with 4 additions and 4 deletions

View File

@ -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"))