1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tandoor_ynh.git synced 2024-09-03 20:35:56 +02:00
tandoor_ynh/scripts/change_url

52 lines
1.7 KiB
Text
Raw Normal View History

2022-08-06 19:00:44 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
2024-07-22 11:04:58 +02:00
ynh_script_progression --message="Stopping a systemd service..." --weight=1
2022-08-06 19:00:44 +02:00
2024-07-22 11:44:36 +02:00
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
2022-08-06 19:00:44 +02:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2024-07-22 11:04:58 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
2022-08-06 19:00:44 +02:00
2024-01-27 15:12:48 +01:00
ynh_change_url_nginx_config
2024-01-28 12:07:09 +01:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
ynh_add_config --template="dot_env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown "$app:$app" "$install_dir/.env"
2022-08-06 19:00:44 +02:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
2024-07-22 11:04:58 +02:00
ynh_script_progression --message="Starting a systemd service..." --weight=1
2022-08-06 19:00:44 +02:00
2024-07-22 11:44:36 +02:00
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
2022-08-06 19:00:44 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2024-07-22 11:04:58 +02:00
ynh_script_progression --message="Change of URL completed for $app" --last