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:
@@ -73,4 +73,4 @@ conda.ensure_conda_packages(USER_ENV_PREFIX, [
|
||||
])
|
||||
systemd.reload_daemon()
|
||||
systemd.start_service('configurable-http-proxy')
|
||||
systemd.start_service('jupyterhub')
|
||||
systemd.restart_service('jupyterhub')
|
||||
|
||||
@@ -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