Global upgrade

This commit is contained in:
Maniack Crudelis
2019-02-10 15:02:38 +01:00
parent 57cceced5d
commit 05d5511136
9 changed files with 114 additions and 28 deletions

View File

@@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS
#=================================================
ynh_print_info "Retrieve arguments from the manifest"
old_domain=$YNH_APP_OLD_DOMAIN
old_path=$YNH_APP_OLD_PATH
@@ -24,6 +25,7 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
# LOAD SETTINGS
#=================================================
ynh_print_info "Load settings"
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get $app final_path)
@@ -35,6 +37,7 @@ final_path=$(ynh_app_setting_get $app final_path)
#=================================================
# CHECK THE SYNTAX OF THE PATHS
#=================================================
ynh_print_info "Check the syntax of the paths"
test -n "$old_path" || old_path="/"
test -n "$new_path" || new_path="/"
@@ -62,6 +65,7 @@ fi
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_print_info "Modify url in nginx configuration"
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
@@ -98,5 +102,12 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_print_info "Reload nginx"
systemctl reload nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info "Change of url completed"