1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git synced 2024-09-03 19:36:27 +02:00

adding ynh_backup_if_checksum protection on some files

This commit is contained in:
farvardin 2020-04-28 08:57:06 +02:00
parent c18587ba2a
commit 1bcd5c671c
No known key found for this signature in database
GPG key ID: F35CBC4DA8BA0327
2 changed files with 12 additions and 2 deletions

View file

@ -296,6 +296,10 @@ fi
# Calculate and store the config file checksum into the app settings
##ynh_store_file_checksum --file="$final_path/CONFIG_FILE"
ynh_store_file_checksum --file="$final_path/config.php"
ynh_store_file_checksum --file="$final_path/config.t2t"
ynh_store_file_checksum --file="$final_path/menu.php"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -153,9 +153,15 @@ ynh_add_fpm_config
### 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"
ynh_backup_if_checksum_is_different --file="$final_path/config.php"
ynh_backup_if_checksum_is_different --file="$final_path/config.t2t"
ynh_backup_if_checksum_is_different --file="$final_path/menu.php"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$final_path/CONFIG_FILE"
ynh_store_file_checksum --file="$final_path/config.php"
ynh_store_file_checksum --file="$final_path/config.t2t"
ynh_store_file_checksum --file="$final_path/menu.php"
#=================================================
# SETUP LOGROTATE