diff --git a/conf/miniflux.conf b/conf/miniflux.conf index 8102b7c..02025a2 100644 --- a/conf/miniflux.conf +++ b/conf/miniflux.conf @@ -1,3 +1,4 @@ +BASE_URL=http://__DOMAIN____PATH__ LISTEN_ADDR=127.0.0.1:__PORT__ DATABASE_URL=postgres://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__?sslmode=disable RUN_MIGRATIONS=1 diff --git a/conf/nginx.conf b/conf/nginx.conf index f74bf7a..a7548a2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,7 +6,7 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://127.0.0.1:__PORT__/; + proxy_pass http://127.0.0.1:__PORT____PATH__/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/scripts/change_url b/scripts/change_url index 8ab8068..351e219 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -106,6 +106,17 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +domain="$new_domain" +path="$new_path" +ynh_add_config --template="../conf/miniflux.conf" --destination="$final_path/$app.conf" + +chmod 600 "$final_path/$app.conf" + #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/restore b/scripts/restore index be934f7..242c5f2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,6 +66,7 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" +chmod +x "$final_path/miniflux" chown -R $app:www-data "$final_path" #=================================================