From f1ebbd00ba821fd35ffcb93a4d491267b4467af4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 26 May 2021 23:24:42 +0200 Subject: [PATCH] Cleaning up --- conf/nginx.conf | 2 -- scripts/install | 11 ----------- scripts/restore | 9 --------- scripts/upgrade | 24 ------------------------ 4 files changed, 46 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 42927cc..648af53 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,8 +7,6 @@ location / { if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - - more_set_headers "X-Content-Type-Options: nosniff"; index index.php; diff --git a/scripts/install b/scripts/install index 6a7513d..ffbf659 100644 --- a/scripts/install +++ b/scripts/install @@ -94,17 +94,6 @@ ynh_add_config --template="../conf/config-dist.php" --destination="$final_path/d chmod 400 "$final_path/data/config.php" chown $app "$final_path/data/config.php" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -# chown -R $app: $final_path -# chmod o-rwx $final_path -# chmod -R 755 $final_path/data - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 75d5681..86aef78 100644 --- a/scripts/restore +++ b/scripts/restore @@ -75,15 +75,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# # Restore permissions on app files -# chown -R $app: $final_path -# chmod o-rwx $final_path -# chmod -R 755 $final_path/data - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b993ea9..033dfe7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,23 +68,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=5 - # Create a temporary directory - #tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - #cp -R "$final_path/data" "$tmpdir/data" - - # Remove the app directory securely - #ynh_secure_remove --file="$final_path" - # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data" - - # Copy the admin saved settings from tmp directory to final path - #cp -RT "$tmpdir/data" "$final_path/data" - - # Remove the tmp directory securely - #ynh_secure_remove --file="$tmpdir" fi chmod 750 "$final_path" @@ -124,15 +109,6 @@ ynh_add_config --template="../conf/config-dist.php" --destination="$final_path/d chmod 400 "$final_path/data/config.php" chown $app "$final_path/data/config.php" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -# chown -R $app: $final_path -# chmod o-rwx $final_path -# chmod -R 755 $final_path/data - #================================================= # RELOAD NGINX #=================================================