summaryrefslogtreecommitdiff
path: root/roles/network/wireguard/gateway/templates/systemd-fix-default-gw.service.j2
blob: 8228da3e51b759b7dd11901f0c53b83a22fcb11f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
[Unit]
Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
ExecStart=/sbin/ip route add {{ item.value.default_gateway.outer }} via {{ wireguard_gateway_original_defaultgw }}
ExecStop=/sbin/ip route del {{ item.value.default_gateway.outer }} via {{ wireguard_gateway_original_defaultgw }}
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target