2018-12-29 01:36:14 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2019-08-14 00:07:10 +02:00
|
|
|
source _common.sh
|
2018-12-29 01:36:14 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2019-01-04 01:40:55 +01:00
|
|
|
#=================================================
|
2019-08-14 00:07:10 +02:00
|
|
|
# STOP SYSTEMD SERVICE
|
2019-01-04 01:40:55 +01:00
|
|
|
#=================================================
|
2024-03-21 23:29:19 +01:00
|
|
|
ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
|
2019-01-04 01:40:55 +01:00
|
|
|
|
2023-11-27 17:21:33 +01:00
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
2019-01-04 01:40:55 +01:00
|
|
|
|
2018-12-29 01:36:14 +01:00
|
|
|
#=================================================
|
2019-08-14 00:07:10 +02:00
|
|
|
# MODIFY URL IN NGINX CONF
|
2018-12-29 01:36:14 +01:00
|
|
|
#=================================================
|
2023-12-22 17:09:44 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
2018-12-29 01:36:14 +01:00
|
|
|
|
2023-11-27 17:13:12 +01:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2018-12-29 01:36:14 +01:00
|
|
|
#=================================================
|
|
|
|
# CONFIGURE JUPYTERLAB
|
|
|
|
#=================================================
|
2023-11-27 17:21:33 +01:00
|
|
|
|
2019-08-14 00:07:10 +02:00
|
|
|
domain=$new_domain
|
2024-03-21 23:29:19 +01:00
|
|
|
path_no_slash=${new_path%/}
|
2021-03-17 18:55:20 +01:00
|
|
|
|
2023-11-27 17:21:33 +01:00
|
|
|
ynh_add_config --template="jupyterhub_config.py" --destination="$install_dir/config/jupyterhub_config.py"
|
2018-12-29 01:36:14 +01:00
|
|
|
|
2019-08-14 00:07:10 +02:00
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-03-21 23:29:19 +01:00
|
|
|
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
|
2019-08-14 00:07:10 +02:00
|
|
|
|
2022-03-11 00:23:07 +01:00
|
|
|
# Start a systemd service
|
2024-03-21 23:29:19 +01:00
|
|
|
ynh_systemd_action --service_name="$app" --action="start" --line_match="JupyterHub is now running at" --log_path="systemd"
|
2019-08-14 00:07:10 +02:00
|
|
|
|
2019-01-04 01:40:55 +01:00
|
|
|
#=================================================
|
2019-08-14 00:07:10 +02:00
|
|
|
# END OF SCRIPT
|
2019-01-04 01:40:55 +01:00
|
|
|
#=================================================
|
|
|
|
|
2019-08-18 00:02:04 +02:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|