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

apply example_ynh to change_url

This commit is contained in:
yalh76 2019-02-14 19:48:51 +01:00
parent cd9e0d02d2
commit 9c558f3cbc

View file

@ -24,6 +24,10 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info "Loading installation settings..."
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get $app final_path)
port=$(ynh_app_setting_get $app port) port=$(ynh_app_setting_get $app port)
@ -72,6 +76,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_print_info "Updating nginx configuration..."
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
@ -108,6 +113,7 @@ fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_print_info "Reloading nginx..."
ynh_system_reload --service_name=nginx ynh_system_reload --service_name=nginx
@ -118,3 +124,9 @@ ynh_system_reload --service_name=nginx
path_url=$old_path path_url=$old_path
domain=$old_domain domain=$old_domain
ynh_maintenance_mode_OFF ynh_maintenance_mode_OFF
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info "Change of url completed for $app"