From 7ab53230a4bf3c5dcead8c6f9978221506216c6c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 27 Mar 2022 12:02:40 +0200 Subject: [PATCH] Fix --- conf/nginx.conf | 30 +++++++++++++++--------------- scripts/install | 2 +- scripts/upgrade | 13 ++++++------- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 3b75731..c41c286 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,19 +8,19 @@ location __PATH__/ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M"; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param HTTP_PROXY ""; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - include /etc/nginx/fastcgi_params; - } + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M"; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param HTTP_PROXY ""; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + } } diff --git a/scripts/install b/scripts/install index 0f4dc38..9ba5110 100644 --- a/scripts/install +++ b/scripts/install @@ -134,7 +134,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/.env" --destination="$final_path/.env" chmod 400 "$final_path/$final_path/.env" -chown $app:$app "$final_path/$final_path/.env" +chown $app:$app "$final_path/.env" #============================================== # INSTALL Composer diff --git a/scripts/upgrade b/scripts/upgrade index 1c632ca..32549bb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) @@ -76,7 +75,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" #================================================= # CREATE DEDICATED USER @@ -95,7 +94,7 @@ then ynh_script_progression --message="Upgrading source files..." --time --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env" fi chmod 750 "$final_path" @@ -136,9 +135,9 @@ ynh_add_fpm_config pushd $final_path php$phpversion artisan view:clear - php$phpversion artisan config:clear - php$phpversion artisan migrate --force - php$phpversion artisan db:seed --force + php$phpversion artisan config:clear + php$phpversion artisan migrate --force + php$phpversion artisan db:seed --force popd #================================================= @@ -161,7 +160,7 @@ yunohost service add $app --description="Pterodactyl Queue Worker" --log="/var/l #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" #================================================= # RELOAD NGINX