1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wetty_ynh.git synced 2024-09-03 18:16:29 +02:00

Tweaks for change_url

This commit is contained in:
Alexandre Aubin 2019-02-13 18:49:07 +01:00
parent b188ea561a
commit 798ef54052

View file

@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# RETRIEVE ARGUMENTS # RETRIEVE ARGUMENTS
#================================================= #=================================================
ynh_print_info "Retrieve arguments from the manifest"
old_domain=$YNH_APP_OLD_DOMAIN old_domain=$YNH_APP_OLD_DOMAIN
old_path=$YNH_APP_OLD_PATH old_path=$YNH_APP_OLD_PATH
@ -25,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info "Load settings" ynh_print_info "Loading installation settings..."
# Needed for helper "ynh_add_nginx_config" # Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get $app final_path)
@ -37,7 +36,6 @@ final_path=$(ynh_app_setting_get $app final_path)
#================================================= #=================================================
# CHECK THE SYNTAX OF THE PATHS # CHECK THE SYNTAX OF THE PATHS
#================================================= #=================================================
ynh_print_info "Check the syntax of the paths"
test -n "$old_path" || old_path="/" test -n "$old_path" || old_path="/"
test -n "$new_path" || new_path="/" test -n "$new_path" || new_path="/"
@ -65,7 +63,7 @@ fi
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_print_info "Modify url in nginx configuration" 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
@ -102,7 +100,7 @@ fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_print_info "Reload nginx" ynh_print_info "Reloading nginx..."
systemctl reload nginx systemctl reload nginx