Update systemd templates

This commit is contained in:
Alexandre CATTEAU 2023-06-03 18:40:42 +02:00
parent 3156e64b26
commit ea8d30d57d
2 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@
Description=Detect WireGuard VPN activation Description=Detect WireGuard VPN activation
[Path] [Path]
PathExists=/sys/class/net/wg0 PathExists=/sys/class/net/wg0/dev_id
Unit=set-ip-routes.service Unit=set-ip-routes.service
[Install] [Install]

View File

@ -3,6 +3,7 @@ Description=Update IP routes after connecting to VPN
[Service] [Service]
Type=oneshot Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/ip route del default dev wg0 ExecStart=/usr/sbin/ip route del default dev wg0
ExecStart=/usr/sbin/ip route add PH_DNS dev wg0 ExecStart=/usr/sbin/ip route add PH_DNS dev wg0
ExecStart=/usr/sbin/ip route add PH_NETWORK dev wg0 ExecStart=/usr/sbin/ip route add PH_NETWORK dev wg0