mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #792 from YunoHost/fix_helpers_ynh_backup_if_checksum_is_different
Check that exist before the calculate the checksum
This commit is contained in:
commit
a48e3b2246
1 changed files with 1 additions and 1 deletions
|
@ -339,7 +339,7 @@ ynh_backup_if_checksum_is_different () {
|
|||
backup_file_checksum=""
|
||||
if [ -n "$checksum_value" ]
|
||||
then # Proceed only if a value was stored into the app settings
|
||||
if ! echo "$checksum_value $file" | sudo md5sum -c --status
|
||||
if [ -e $file ] && ! echo "$checksum_value $file" | sudo md5sum -c --status
|
||||
then # If the checksum is now different
|
||||
backup_file_checksum="/home/yunohost.conf/backup/$file.backup.$(date '+%Y%m%d.%H%M%S')"
|
||||
sudo mkdir -p "$(dirname "$backup_file_checksum")"
|
||||
|
|
Loading…
Add table
Reference in a new issue