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

55 lines
1.9 KiB
Text
Raw Normal View History

2019-05-22 22:24:23 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
2019-05-23 21:47:50 +02:00
ynh_script_progression --message="Stopping a systemd service..." --weight=1
2019-05-22 22:24:23 +02:00
2019-10-07 16:47:35 +02:00
ynh_systemd_action --service_name=$app --action="stop"
2019-05-22 22:24:23 +02:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2020-12-03 13:01:51 +01:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
2019-05-22 22:24:23 +02:00
2023-04-02 14:48:59 +02:00
ynh_change_url_nginx_config
2019-05-22 22:24:23 +02:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=3
# Create a dedicated systemd config
ynh_add_systemd_config
2021-03-17 22:08:29 +01:00
ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app"
2019-05-24 21:10:58 +02:00
2019-05-22 22:24:23 +02:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
2019-05-23 21:47:50 +02:00
ynh_script_progression --message="Starting a systemd service..." --weight=12
2019-05-22 22:24:23 +02:00
2022-09-21 01:03:09 +02:00
# Start a systemd service
2023-04-02 14:48:59 +02:00
ynh_systemd_action --service_name=$app --action=start --log_path="$install_dir/airsonic.log" --line_match="Started Application in"
2019-05-22 22:24:23 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2019-05-23 21:47:50 +02:00
ynh_script_progression --message="Change of URL completed for $app" --last