1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ttrss_ynh.git synced 2024-10-01 13:34:46 +02:00
ttrss_ynh/scripts/change_url

54 lines
1.8 KiB
Text
Raw Normal View History

2018-05-27 21:20:39 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2020-08-14 23:03:14 +02:00
source _common.sh
2018-05-27 21:20:39 +02:00
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
2018-05-27 21:20:39 +02:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2020-08-14 12:29:45 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
2018-05-27 21:20:39 +02:00
ynh_change_url_nginx_config
2018-05-27 21:20:39 +02:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
2020-08-14 23:08:47 +02:00
2022-02-11 09:00:27 +01:00
domain_path="https://${new_domain}${new_path}"
2022-02-11 09:01:40 +01:00
domain="$new_domain"
ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php"
2020-08-15 09:12:59 +02:00
chmod 400 "$install_dir/config.php"
chown $app "$install_dir/config.php"
2020-08-14 23:08:47 +02:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
2019-05-01 20:35:48 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2018-05-27 21:20:39 +02:00
2019-05-01 20:35:48 +02:00
ynh_script_progression --message="Change of URL completed for $app" --last