Fix conf backup

This commit is contained in:
Administrator 2024-08-14 11:53:49 +00:00
parent 988da0f5d1
commit 570e937df8
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
if [ -f /etc/bashclub/zsync.conf ]; then
if [ -f /etc/bashclub/zsync.conf ] && [ ! -f /etc/bashclub/zsync.conf.backup_$(date +%Y-%m-%d) ] ; then
cp /etc/bashclub/zsync.conf /etc/bashclub/zsync.conf.backup_$(date +%Y-%m-%d)
fi

View File

@ -9,4 +9,8 @@ if ! dpkg -l bashclub-zsync > /dev/null 2>&1; then
mv ${zsync} ${zsync}.legacy
chmod -x ${zsync}.legacy
fi
fi
fi
if [ -f /etc/bashclub/zsync.conf ] && [ ! -f /etc/bashclub/zsync.conf.backup_$(date +%Y-%m-%d) ] ; then
cp /etc/bashclub/zsync.conf /etc/bashclub/zsync.conf.backup_$(date +%Y-%m-%d)
fi