safe adding ALLOW_BACKUP_ANYTIME to vesta.conf

This commit is contained in:
myvesta 2020-05-09 21:12:16 +02:00 committed by GitHub
commit f08de3d41c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,6 +46,7 @@ if [ ! -f "/usr/local/vesta/data/upgrades/allow-backup-anytime" ]; then
touch /usr/local/vesta/data/upgrades/allow-backup-anytime
check_grep=$(grep -c 'ALLOW_BACKUP_ANYTIME' /usr/local/vesta/conf/vesta.conf)
if [ "$check_grep" -eq 0 ]; then
echo "" >> /usr/local/vesta/conf/vesta.conf
echo "ALLOW_BACKUP_ANYTIME='yes'" >> /usr/local/vesta/conf/vesta.conf
fi
fi