fix: deploy-server.sh migrates posterg.db → xamxam.db and cleans legacy nginx configs

This commit is contained in:
Pontoporeia
2026-04-30 11:27:19 +02:00
parent ab51bf3a66
commit cb883ab33f
2 changed files with 12 additions and 0 deletions

View File

@@ -50,6 +50,8 @@
- [x] Replace all remaining "Post-ERG" branding with "XAMXAM" (scripts, PHP source, schema, docs) - [x] Replace all remaining "Post-ERG" branding with "XAMXAM" (scripts, PHP source, schema, docs)
- [x] `deploy-server.sh`: remove legacy `sites-enabled/posterg` symlink to fix duplicate `limit_req_zone` nginx error - [x] `deploy-server.sh`: remove legacy `sites-enabled/posterg` symlink to fix duplicate `limit_req_zone` nginx error
- [x] `deploy-server.sh`: auto-migrate `.htpasswd-posterg``.htpasswd-xamxam` if new file absent - [x] `deploy-server.sh`: auto-migrate `.htpasswd-posterg``.htpasswd-xamxam` if new file absent
- [x] `deploy-server.sh`: auto-migrate `posterg.db``xamxam.db` if new DB missing/empty; remove legacy file
- [x] `deploy-server.sh`: clean up legacy posterg nginx configs and prune old backups
- [x] Rename local `storage/posterg.db``storage/xamxam.db` - [x] Rename local `storage/posterg.db``storage/xamxam.db`
## LDAP auth migration (pending client access) ## LDAP auth migration (pending client access)

View File

@@ -42,6 +42,16 @@ if [ -d "/var/www/xamxam/storage" ]; then
ok "Storage: 2775, databases: 660" ok "Storage: 2775, databases: 660"
fi fi
# Migrate posterg.db → xamxam.db if the new name is missing or empty
if [ -f "/var/www/xamxam/storage/posterg.db" ]; then
if [ ! -s "/var/www/xamxam/storage/xamxam.db" ]; then
cp /var/www/xamxam/storage/posterg.db /var/www/xamxam/storage/xamxam.db
ok "Migrated posterg.db → xamxam.db"
fi
rm /var/www/xamxam/storage/posterg.db
ok "Removed legacy posterg.db"
fi
# Ensure writable cache subdirectories exist for php-fpm (www-data) # Ensure writable cache subdirectories exist for php-fpm (www-data)
mkdir -p /var/www/xamxam/storage/cache/rate_limit mkdir -p /var/www/xamxam/storage/cache/rate_limit
chown -R www-data:xamxam /var/www/xamxam/storage/cache chown -R www-data:xamxam /var/www/xamxam/storage/cache