Reset port 443 redirect during sanitize

Clear iptables-restore service and rules so wizard can reconfigure
fresh. Fixes MOTD showing wrong port after re-running wizard.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Aaron D. Lee
2026-01-05 14:01:31 -05:00
parent 255ae4f30d
commit 0e0aa996bc

View File

@@ -227,6 +227,14 @@ rm -rf /home/*/stegasoo/frontends/web/certs/
# Remove any .env files with channel keys # Remove any .env files with channel keys
rm -f /opt/stegasoo/frontends/web/.env 2>/dev/null rm -f /opt/stegasoo/frontends/web/.env 2>/dev/null
rm -f /home/*/stegasoo/frontends/web/.env rm -f /home/*/stegasoo/frontends/web/.env
# Reset port 443 redirect (user reconfigures in wizard)
if systemctl is-enabled --quiet iptables-restore 2>/dev/null; then
systemctl disable iptables-restore 2>/dev/null || true
rm -f /etc/systemd/system/iptables-restore.service
rm -f /etc/iptables.rules
iptables -t nat -F PREROUTING 2>/dev/null || true
echo " Port 443 redirect cleared"
fi
echo " Stegasoo instance data cleared" echo " Stegasoo instance data cleared"
# ============================================================================= # =============================================================================