1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/codimd_ynh.git synced 2024-09-03 18:16:32 +02:00
codimd_ynh/scripts/change_url

51 lines
1.7 KiB
Text
Raw Normal View History

2020-05-21 12:49:24 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
2020-05-21 12:49:24 +02:00
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
2020-05-29 22:31:43 +02:00
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
2020-05-21 12:49:24 +02:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2020-10-12 22:05:07 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
2020-05-21 12:49:24 +02:00
ynh_change_url_nginx_config
2020-05-21 12:49:24 +02:00
2020-07-06 12:24:00 +02:00
#=================================================
# CONFIGURE CODIMD
#=================================================
path=${path:1}
domain=new_domain
2023-12-24 14:39:50 +01:00
ynh_add_config --template="config.json.example" --destination="$install_dir/config.json"
2020-07-06 12:24:00 +02:00
2020-05-21 12:49:24 +02:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
2021-05-08 12:13:28 +02:00
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening"
2020-05-21 12:49:24 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2022-02-04 00:57:49 +01:00
ynh_script_progression --message="Change of URL completed for $app" --last