Automation: Task execution results 2026-02-09 11:01:38

This commit is contained in:
2026-02-09 11:01:38 -06:00
parent 6a33a2e209
commit 86582a84da
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#!/bin/bash
# Clean removal of BookStack
set -e
echo "=== Removing BookStack ==="
date
# Stop PHP-FPM
systemctl stop php8.3-fpm
# Remove BookStack directory
rm -rf /var/www/bookstack
# Remove Nginx config
rm -f /etc/nginx/sites-enabled/bookstack
rm -f /etc/nginx/sites-available/bookstack
# Drop database
mysql -e "DROP DATABASE IF EXISTS bookstack_db;"
mysql -e "DROP USER IF EXISTS 'bookstack_user'@'localhost';"
# Remove SSL certificate (we'll recreate for MkDocs)
certbot delete --cert-name docs.firefrostgaming.com --non-interactive
# Reload Nginx
nginx -t && systemctl reload nginx
# Remove sync script and cron
rm -f /opt/bookstack-sync.sh
crontab -l | grep -v bookstack-sync | crontab -
echo ""
echo "=== BookStack Removed ==="
echo "Ready for MkDocs deployment"

View File

@@ -0,0 +1,15 @@
Task: remove-bookstack.sh
Started: Mon Feb 9 11:01:36 AM CST 2026
==========================================
=== Removing BookStack ===
Mon Feb 9 11:01:36 AM CST 2026
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Deleted all files relating to certificate docs.firefrostgaming.com.
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
=== BookStack Removed ===
Ready for MkDocs deployment
==========================================
Finished: Mon Feb 9 11:01:38 AM CST 2026
Exit Code: 0