[mod] backup script rewritten (inspired and adpated from example_ynh).

Currently neither backup nor restore are useful but are safe enough to
not break the upgrade script. That's what matters for now.
This commit is contained in:
pitchum
2018-05-09 10:31:46 +02:00
committed by pitchum
parent f6165c5dc6
commit 8cbe81be03
3 changed files with 194 additions and 4 deletions

View File

@@ -36,6 +36,13 @@ if [ -f /etc/php5/fpm/pool.d/vpnadmin.conf ]; then
fi
test -d /var/www/vpnadmin && mv /var/www/vpnadmin /var/www/${app}
# Versions known to have a buggy backup script
buggy_versions="1.0.0 1.0.1 1.1.0"
curr_version=$(read_manifest version)
if echo $buggy_versions | grep -w $curr_version > /dev/null; then
echo "Your current version of ${app} is very old: ${curr_version}. Please ignore the next warning." >&2
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================