diff --git a/scripts/_common.sh b/scripts/_common.sh index 396ba5b..73492e7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -28,7 +28,7 @@ rp_validate_proxy_path() { # Make reverse proxy public if $1 is 1 # Yunohost boolean params are 1 if true rp_make_permissions() { - #ynh_script_progression --message="Configuring permissions..." --weight=2 + ynh_script_progression --message="Configuring permissions..." --weight=2 if [ $1 = 1 ]; then ynh_permission_update --permission="main" --add="visitors" @@ -37,7 +37,7 @@ rp_make_permissions() { # (re)generate nginx config rp_make_webconfig() { - #ynh_script_progression --message="Configuring NGINX web server..." --weight=1 + ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Nginx configuration ynh_replace_string "YNH_LOCATION" "$path_url" ../conf/nginx.conf @@ -48,6 +48,6 @@ rp_make_webconfig() { } rp_reload_web() { - #ynh_script_progression --message="Reloading NGINX web server..." --weight=1 + ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload } diff --git a/scripts/change_url b/scripts/change_url index 5df118d..38cff43 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,9 +29,8 @@ new_path=$YNH_APP_NEW_PATH # Path availability is already checked for #================================================= -# CONFIGURE NGINX +# REVERSEPROXY_YNH #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Nginx configuration ynh_replace_string "$old_path {" "$new_path {" /etc/nginx/conf.d/$old_domain.d/$app.conf @@ -42,7 +41,6 @@ ynh_replace_string "302 ${old_path}/" "302 ${new_path}/" /etc/nginx/conf.d/$old_ [[ "$old_domain" != "$new_domain" ]] && mv /etc/nginx/conf.d/$old_domain.d/$app.conf /etc/nginx/conf.d/$new_domain.d/$app.conf # Reload nginx -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 rp_reload_web #================================================= diff --git a/scripts/install b/scripts/install index 35f993e..50d716f 100644 --- a/scripts/install +++ b/scripts/install @@ -30,7 +30,7 @@ assets_path=$YNH_APP_ARG_ASSETS_PATH is_public=$YNH_APP_ARG_IS_PUBLIC #================================================= -# REVERSE PROXY LOGIC +# REVERSEPROXY_YNH #================================================= # Check domain/path availability @@ -44,15 +44,12 @@ ynh_app_setting_set --app=$app --key=proxy_path --value=$proxy_path ynh_app_setting_set --app=$app --key=assets_path --value=$assets_path # Configure nginx -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 rp_make_webconfig # Make app public if necessary -ynh_script_progression --message="Configuring permissions..." --weight=2 rp_make_permissions $is_public # Reload nginx -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 rp_reload_web #================================================= diff --git a/scripts/remove b/scripts/remove index 1ed7388..16efd3b 100644 --- a/scripts/remove +++ b/scripts/remove @@ -19,14 +19,13 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= -# REMOVE NGINX CONFIGURATION +# REVERSEPROXY_YNH #================================================= # Remove configuration files ynh_secure_remove /etc/nginx/conf.d/$domain.d/$app.conf # Reload nginx -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 rp_reload_web #================================================= diff --git a/scripts/restore b/scripts/restore index 1b87580..ff00b3f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,6 +27,10 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) proxy_path=$(ynh_app_setting_get --app=$app --key=proxy_path) assets_path=$(ynh_app_setting_get --app=$app --key=assets_path) +#================================================= +# REVERSEPROXY_YNH +#================================================= + # Revalidate destination path rp_validate_proxy_path "$proxy_path" diff --git a/scripts/upgrade b/scripts/upgrade index c360cd6..811d69e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,18 +35,16 @@ ynh_clean_setup () { ynh_abort_if_errors #================================================= -# REVERSE PROXY LOGIC +# REVERSEPROXY_YNH #================================================= # Validate proxy destination rp_validate_proxy_path "$proxy_path" # Configure nginx -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 rp_make_webconfig # Reload nginx -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 rp_reload_web #=================================================