Skip to content

Commit

Permalink
Changing how SSH is enabled.
Browse files Browse the repository at this point in the history
	Now using systemctl for both enabling and disabling\
	modified:   mycroft/client/wifisetup/main.py
  • Loading branch information
kfezer authored and aatchison committed May 9, 2017
1 parent fb91221 commit d68b1dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mycroft/client/wifisetup/main.py
Expand Up @@ -574,14 +574,15 @@ def reset(self, event=None):
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))
Expand Down

0 comments on commit d68b1dd

Please sign in to comment.