mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Restart JupyterHub after each install
Restarting JupyterHub should be non-disruptive, and helps make the config changes come true ASAP.
This commit is contained in:
@@ -46,3 +46,14 @@ def start_service(name):
|
||||
'start',
|
||||
name
|
||||
], check=True)
|
||||
|
||||
|
||||
def restart_service(name):
|
||||
"""
|
||||
Restart service with given name.
|
||||
"""
|
||||
subprocess.run([
|
||||
'systemctl',
|
||||
'restart',
|
||||
name
|
||||
], check=True)
|
||||
|
||||
Reference in New Issue
Block a user