Move all config files inside INSTALL_PREFIX

Makes cleanup easier!
This commit is contained in:
yuvipanda
2018-06-27 03:10:41 -07:00
parent de7fda47db
commit 12698a20ed
4 changed files with 7 additions and 5 deletions

View File

@@ -31,8 +31,10 @@ def ensure_jupyterhub_service(prefix):
systemd.install_unit('jupyterhub.service', hub_unit_template.format(**unit_params))
# Set up proxy / hub secret oken if it is not already setup
if not os.path.exists('/etc/jupyterhub/configurable-http-proxy.secret'):
with open('/etc/jupyterhub/configurable-http-proxy.secret', 'w') as f:
# FIXME: Check umask here properly
proxy_secret_path = os.path.join(INSTALL_PREFIX, 'configurable-http-proxy.secret')
if not os.path.exists(proxy_secret_path):
with open(proxy_secret_path, 'w') as f:
f.write('CONFIGPROXY_AUTH_TOKEN=' + secrets.token_hex(32))