Merge pull request #1735 from aptkzzz/dev

Backing up /etc/nginx folder before install
This commit is contained in:
Théophile Diot 2024-11-20 12:11:51 +01:00 committed by GitHub
commit a73c8083f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,6 +43,11 @@ if [ -f /etc/os-release ]; then
echo " Copy /var/tmp/db.sqlite3 to /var/lib/bunkerweb/db.sqlite3"
do_and_check_cmd cp -f /var/tmp/db.sqlite3 /var/lib/bunkerweb/db.sqlite3
fi
if [ -d /etc/nginx ]; then
output_path="/etc/nginx_backup_$(date +%s)"
echo " Copy /etc/nginx to $output_path"
do_and_check_cmd cp -R /etc/nginx $output_path
fi
else
echo "❌ Error: /etc/os-release not found"
exit 1