Changing how SSH is enabled.

Now using systemctl for both enabling and disabling\
	modified:   mycroft/client/wifisetup/main.py
pull/762/head release/v0.8.12
kfezer@gmail.com 2017-05-08 18:08:07 -07:00 committed by Arron Atchison
parent fb912215af
commit d68b1dddb3
1 changed files with 3 additions and 2 deletions

View File

@ -574,14 +574,15 @@ class WiFi:
def ssh_enable(self, event=None):
LOG.info("Enabling SSH")
try:
call('touch /boot/ssh', shell=True)
call('systemctl enable ssh.service', shell=True)
call('systemctl start ssh.service', shell=True)
except Exception as e:
LOG.error("Error: {0}".format(e))
def ssh_disable(self, event=None):
LOG.info("Disabling SSH")
try:
call('rm /boot/ssh', shell=True)
call('systemctl stop ssh.service', shell=True)
call('systemctl disable ssh.service', shell=True)
except Exception as e:
LOG.error("Error: {0}".format(e))