Start JupyterHub / CHP when system starts

This commit is contained in:
yuvipanda
2018-06-28 00:49:36 -07:00
parent 30486963d7
commit dd53176889
4 changed files with 25 additions and 0 deletions

View File

@@ -57,3 +57,16 @@ def restart_service(name):
'restart',
name
], check=True)
def enable_service(name):
"""
Enable a service with given name.
This most likely makes the service start on bootup
"""
subprocess.run([
'systemctl',
'enable',
name
], check=True)