Merge pull request #332 from MycroftAI/issue/fix-poweroff-sudo-path
Stating PATH in the same subprocess callpull/335/head^2
commit
9ecff8f4f6
|
@ -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