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:
yuvipanda
2018-06-27 18:07:59 -07:00
parent 8a19b02864
commit 582ef74a61
2 changed files with 12 additions and 1 deletions

View File

@@ -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')

View File

@@ -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)