diff --git a/conf/nginx.conf b/conf/nginx.conf index a760716..ca9e59f 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,7 +10,7 @@ location / { index index.php; - client_max_body_size 500M; + client_max_body_size 512M; try_files $uri $uri/ /index.php; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 22fd556..7b478d9 100755 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -420,7 +420,7 @@ chdir = __FINALPATH__ ; Common values to change to increase file upload limit php_admin_value[upload_max_filesize] = 500M -php_admin_value[post_max_size] = 510M +php_admin_value[post_max_size] = 512M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters diff --git a/manifest.json b/manifest.json index 3328661..ec51aa0 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Hosting platform made for podcasters", "fr": "Plateforme d'hébergement conçue pour les podcasteurs" }, - "version": "1.0.0-40~ynh1", + "version": "1.0.0-40~ynh2", "url": "https://podlibre.org/", "license": "GPL-3.0-only", "maintainer": { diff --git a/scripts/install b/scripts/install index 76265bc..284a5a4 100755 --- a/scripts/install +++ b/scripts/install @@ -55,6 +55,14 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 + +# Create a system user +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -72,14 +80,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -111,6 +111,8 @@ ynh_store_file_checksum --file="$final_path/.env" chown -R $app: $final_path chmod -R 755 $final_path +chmod 600 $final_path/.env + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 98524f8..5c1c417 100755 --- a/scripts/restore +++ b/scripts/restore @@ -52,20 +52,20 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=2 - -ynh_restore_file --origin_path="$final_path" - #================================================= # RECREATE THE DEDICATED USER #================================================= ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir=$final_path + +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= +ynh_script_progression --message="Restoring the app main directory..." --weight=2 + +ynh_restore_file --origin_path="$final_path" #================================================= # RESTORE USER RIGHTS @@ -75,6 +75,8 @@ ynh_system_user_create --username=$app chown -R $app: $final_path chmod -R 755 $final_path +chmod 600 $final_path/.env + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2444e21..9a7ddca 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,6 +65,14 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -85,14 +93,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -111,6 +111,8 @@ ynh_add_fpm_config --package="$extra_php_dependencies" chown -R $app: $final_path chmod -R 755 $final_path +chmod 600 $final_path/.env + #================================================= # RELOAD NGINX #=================================================