From daeaa3b9d9d698090e69d6702f75c35fca71d07a Mon Sep 17 00:00:00 2001 From: Ahmed AbdelHalim Date: Wed, 19 Nov 2025 16:59:51 +0100 Subject: Update docs about the usage of gateway-init service --- roles/gateway/templates/gateway-init.service.j2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/gateway/templates') diff --git a/roles/gateway/templates/gateway-init.service.j2 b/roles/gateway/templates/gateway-init.service.j2 index 8b4635d8..4fec5d22 100644 --- a/roles/gateway/templates/gateway-init.service.j2 +++ b/roles/gateway/templates/gateway-init.service.j2 @@ -5,6 +5,10 @@ After=network.target [Service] Type=oneshot +# Both commands run at boot to handle either scenario: +# - If VPN autostart is enabled: vpn applies rules, direct ignores (VPN active) +# - If no VPN autostart: vpn ignores (no interfaces), direct applies rules +# The gateway-apply-rules script checks interface state and only applies appropriate rules ExecStart=/usr/local/bin/gateway-apply-rules vpn ExecStart=/usr/local/bin/gateway-apply-rules direct User=root -- cgit v1.2.3