Changing how SSH is enabled.

Now using systemctl for both enabling and disabling\
	modified:   mycroft/client/wifisetup/main.py
pull/748/head
kfezer@gmail.com 2017-05-08 18:08:07 -07:00 committed by Art McGee
parent cf14c64f5a
commit 12ebabb70f
1 changed files with 3 additions and 2 deletions

View File

@ -575,14 +575,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))