From 7572a959cc70a45f51bb9b7c6f8da8dfe3e56b76 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Fri, 10 Apr 2020 17:07:35 +0200 Subject: [PATCH] remove file_checksum md5 not needed --- README.md | 1 - scripts/backup | 13 ------------- scripts/install | 16 ++++++++-------- scripts/upgrade | 10 ---------- 4 files changed, 8 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 96d92fe..d4c6a25 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ site de garradin : http://garradin.eu - À travers l'interface d'administration ### TODO list : -- Backup de la base de donnée SQlite (AIDE REQUISE)? [Résolu] - Permissions de certains fichiers sensibles ? #### Problèmes / Avertissements : diff --git a/scripts/backup b/scripts/backup index 810a34e..27102aa 100644 --- a/scripts/backup +++ b/scripts/backup @@ -53,17 +53,4 @@ ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # END OF SCRIPT #================================================= - ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --time --last -#ynh_backup --src_path="/etc/php/7.0/fpm/conf.d/20-$app.ini" - -# # Backup directory location for the app from where the script is executed and -# # which will be compressed afterward -# backup_dir=$YNH_APP_BACKUP_DIR - -# # Backup sources & data -# ynh_backup "/var/www/$app" "sources" - -# # Copy Nginx conf -# sudo mkdir -p ./conf -# ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "conf/nginx.conf" \ No newline at end of file diff --git a/scripts/install b/scripts/install index 2ba6b3d..062eb91 100644 --- a/scripts/install +++ b/scripts/install @@ -79,12 +79,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -#================================================= -# Files owned by user app -#================================================= - -chown $app:$app $final_path -R -chmod 755 $final_path -R #================================================= # NGINX CONFIGURATION @@ -125,8 +119,7 @@ ynh_script_progression --message="Reloading nginx web server..." --time --weight systemctl reload nginx #================================================= -# Change options in file config.dist.php -# and copy in local.dist.php +# MODIFY A CONFIG FILE #================================================= key=$(ynh_string_random --length=50) cp -a $final_path/config.dist.php $final_path/config.local.php @@ -138,6 +131,13 @@ else ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" fi +#================================================= +# Files owned by user app +#================================================= + +chown $app:$app $final_path -R +chmod 755 $final_path -R + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3ccb84b..1f53880 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -172,16 +172,6 @@ then cp -a $backup_bdd $final_path/association.sqlite fi -# #================================================= -# # STORE THE CONFIG FILE CHECKSUM -# #================================================= - -# ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. -# ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. -ynh_backup_if_checksum_is_different --file="$final_path/CONFIG_FILE" -# # Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="$final_path/CONFIG_FILE" - #================================================= # Files owned by user app #=================================================