mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Start JupyterHub / CHP when system starts
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user