mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 03:58:34 +03:00
deploy: auto-install iptables + modprobe wg in deploy-remote-access-lab; DB_BACKEND in cluster.env
- deploy-remote-access-lab.sh: install iptables via apk if missing; modprobe wireguard - cluster.env: add DB_BACKEND=1 (MariaDB default; 2=Postgres, 3=SQLite) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,6 +9,15 @@ load_secrets_lab 2>/dev/null || true
|
||||
|
||||
is_primary_node || { log "deploy-remote-access-lab: skip (not primary)"; exit 0; }
|
||||
|
||||
# Ensure iptables is available (needed for WireGuard PostUp/PostDown NAT rules)
|
||||
if ! command -v iptables >/dev/null 2>&1; then
|
||||
log "iptables not found; installing via apk"
|
||||
apk add --no-cache iptables >/dev/null 2>&1 || log "WARN: iptables install failed — PostUp/PostDown may error"
|
||||
fi
|
||||
|
||||
# Load wireguard kernel module if not already loaded
|
||||
modprobe wireguard 2>/dev/null || true
|
||||
|
||||
WG_EXAMPLES="${AC_WORKSPACE_ROOT:-/var/www/ac/workspace}/ac-ms-remote-access/examples/wireguard"
|
||||
[ -d "$WG_EXAMPLES" ] || die "missing $WG_EXAMPLES (init ac-ms-remote-access submodule)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user