diff --git a/scripts/change_url b/scripts/change_url index 4d89301..df385d7 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -110,21 +110,8 @@ fi # CONFIGURE JUPYTERLAB #================================================= -#ynh_backup_if_checksum_is_different --file="$final_path/config/jupyterhub_config.py" - domain=$new_domain -path_url=${new_path%/} - -# cp -f ../conf/jupyterhub_config.py $final_path/config/jupyterhub_config.py -# ynh_replace_string --match_string="__URL__" --replace_string="https://$domain" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT_HUB__" --replace_string="$port_hub" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT_HTTP_PROXY__" --replace_string="$port_http_proxy" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/config/jupyterhub_config.py" - -# ynh_store_file_checksum --file="$final_path/config/jupyterhub_config.py" +path=${new_path%/} ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_path/config/jupyterhub_config.py" diff --git a/scripts/install b/scripts/install index 217e0bb..c1dae89 100644 --- a/scripts/install +++ b/scripts/install @@ -134,34 +134,12 @@ ynh_add_systemd_config mkdir -p "$final_path/config" -# JupyterHub configuration -# cp -f ../conf/jupyterhub_config.py $final_path/config/jupyterhub_config.py - -# ynh_replace_string --match_string="__URL__" --replace_string="https://$domain" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT_HUB__" --replace_string="$port_hub" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT_HTTP_PROXY__" --replace_string="$port_http_proxy" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/config/jupyterhub_config.py" +path=${path_url%/} ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_path/config/jupyterhub_config.py" -# Jupyter notebook configuration -# cp -f ../conf/jupyter_notebook_config.py $final_path/config/jupyter_notebook_config.py - -# ynh_replace_string --match_string="__ENABLE_TERMINAL__" --replace_string="$enable_terminal" --target_file="$final_path/config/jupyter_notebook_config.py" - ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$final_path/config/jupyter_notebook_config.py" -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -# Calculate and store the config file checksum into the app settings -# ynh_store_file_checksum --file="$final_path/config/jupyterhub_config.py" -# ynh_store_file_checksum --file="$final_path/config/jupyter_notebook_config.py" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index e6e76b8..5dc2da6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -108,7 +108,7 @@ yunohost service add $app --description="$app daemon" --log="$app" #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=5 -ynh_systemd_action --service_name=$app --action="start" --line_match="JupyterHub is now running at" --log_path="systemd" +ynh_systemd_action --service_name=$app --action=start --line_match="JupyterHub is now running at" --log_path="systemd" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 5cb4491..5633efb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,32 +132,12 @@ fi # STORE THE CONFIG FILE CHECKSUM #================================================= -#ynh_backup_if_checksum_is_different --file="$final_path/config/jupyterhub_config.py" - mkdir -p "$final_path/config" -# cp -f ../conf/jupyterhub_config.py $final_path/config/jupyterhub_config.py -# ynh_replace_string --match_string="__URL__" --replace_string="https://$domain" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT_HUB__" --replace_string="$port_hub" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__PORT_HTTP_PROXY__" --replace_string="$port_http_proxy" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="$final_path/config/jupyterhub_config.py" -# ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/config/jupyterhub_config.py" - -# # Recalculate and store the checksum of the file for the next upgrade. -# ynh_store_file_checksum --file="$final_path/config/jupyterhub_config.py" +path=${path_url%/} ynh_add_config --template="../conf/jupyterhub_config.py" --destination="$final_path/config/jupyterhub_config.py" -#ynh_backup_if_checksum_is_different --file="$final_path/config/jupyter_notebook_config.py" - -# cp -f ../conf/jupyter_notebook_config.py $final_path/config/jupyter_notebook_config.py - -# ynh_replace_string --match_string="__ENABLE_TERMINAL__" --replace_string="$enable_terminal" --target_file="$final_path/config/jupyter_notebook_config.py" - -# ynh_store_file_checksum --file="$final_path/config/jupyter_notebook_config.py" - ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$final_path/config/jupyter_notebook_config.py" #================================================= @@ -191,7 +171,7 @@ yunohost service add $app --description="$app daemon" --log="$app" #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --line_match="JupyterHub is now running at" --log_path="systemd" +ynh_systemd_action --service_name=$app --action=start --line_match="JupyterHub is now running at" --log_path="systemd" #================================================= # RELOAD NGINX