diff --git a/conf/nginx.conf b/conf/nginx.conf index 217b22f..106b49b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,8 +7,8 @@ location __PATH__/ { proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; - + proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; -} \ No newline at end of file +} diff --git a/manifest.json b/manifest.json index 19c657e..a627350 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Download Manager written in pure Python." }, - "version": "0.4.20~ynh2", + "version": "0.4.20~ynh3", "url": "https://pyload.net/", "upstream": { "license": "AGPL-3.0-or-later", diff --git a/scripts/change_url b/scripts/change_url index a3d7544..5fba4c9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -104,13 +104,6 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." - #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/install b/scripts/install index ded3e21..6ec2383 100644 --- a/scripts/install +++ b/scripts/install @@ -124,11 +124,6 @@ chmod 750 "$datadir" chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" -#================================================= -# ADD A CONFIGURATION -#================================================= -ynh_script_progression --message="Adding a configuration file..." - #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/restore b/scripts/restore index f1702a4..1a34775 100644 --- a/scripts/restore +++ b/scripts/restore @@ -42,13 +42,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -91,6 +84,13 @@ ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index bb059f8..fce7efe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,6 +66,13 @@ ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -74,13 +81,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # SPECIFIC UPGRADE #================================================= @@ -98,11 +98,6 @@ pushd $final_path pip install --pre pyload-ng[all] popd -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." - #================================================= # SETUP SYSTEMD #=================================================