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

58 lines
2 KiB
Text
Raw Normal View History

2019-03-07 03:29:14 +01:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
2019-07-10 00:03:59 +02:00
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
2020-06-15 04:15:42 +02:00
ynh_script_progression --message="Stopping a systemd service..."
2019-07-10 00:03:59 +02:00
2019-12-29 23:56:39 +01:00
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
2019-07-10 00:03:59 +02:00
2019-03-07 03:29:14 +01:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2021-04-08 20:49:54 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..."
2019-03-07 03:29:14 +01:00
2023-03-23 08:54:45 +01:00
ynh_change_url_nginx_config
2019-03-07 03:29:14 +01:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
2019-03-07 12:12:10 +01:00
# MODIFY URL IN .ENV
2019-03-07 03:29:14 +01:00
#=================================================
2020-06-15 04:15:42 +02:00
ynh_script_progression --message="Updating .env configuration..."
2019-03-07 12:12:10 +01:00
2023-03-23 08:54:45 +01:00
ynh_backup_if_checksum_is_different --file="$install_dir/.env"
ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$install_dir/.env"
ynh_store_file_checksum --file="$install_dir/.env"
2019-03-07 03:29:14 +01:00
#=================================================
# GENERIC FINALISATION
2019-07-10 00:03:59 +02:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
2020-06-15 04:15:42 +02:00
ynh_script_progression --message="Starting a systemd service..."
2019-07-10 00:03:59 +02:00
2020-06-15 04:15:42 +02:00
# Start a systemd service
2019-12-29 23:56:39 +01:00
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Started Wekan, task board"
2020-06-15 04:15:42 +02:00
2019-12-29 23:56:39 +01:00
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
sleep 60
fi
2019-07-10 00:03:59 +02:00
2019-03-07 03:29:14 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2020-06-15 04:15:42 +02:00
ynh_script_progression --message="Change of URL completed for $app"