Use systemd file option wherever applicable

This commit is contained in:
Sonny Bakker 2025-03-02 16:05:07 +01:00
parent a44c76344b
commit b2c395b3b7
9 changed files with 94 additions and 146 deletions

View file

@ -6,14 +6,12 @@ Kind=wireguard
Description=WireGuard tunnel {{ vpn_default.interface }}
[WireGuard]
# PrivateKeyFile option does not seem to work, perhaps a bug?
PrivateKey={{ vpn_default.private_key }}
PrivateKeyFile={{ vpn_default.private_key_path }}
{% for peer in vpn_default.peers %}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
# PresharedKeyFile option does not seem to work, perhaps a bug?
PresharedKey={{ peer.preshared_key }}
PresharedKeyFile={{ peer.preshared_key_path }}
AllowedIPs={{ peer.allowd_ips }}
{% if peer.endpoint %}
Endpoint={{ peer.endpoint }}

View file

@ -6,14 +6,12 @@ Kind=wireguard
Description=WireGuard tunnel {{ vpn_media.interface }}
[WireGuard]
# PrivateKeyFile option does not seem to work, perhaps a bug?
PrivateKey={{ vpn_media.private_key }}
PrivateKeyFile={{ vpn_media.private_key_path }}
{% for peer in vpn_media.peers %}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
# PresharedKeyFile option does not seem to work, perhaps a bug?
PresharedKey={{ peer.preshared_key }}
PresharedKeyFile={{ peer.preshared_key_path }}
AllowedIPs={{ peer.allowd_ips }}
{% if peer.endpoint %}
Endpoint={{ peer.endpoint }}

View file

@ -6,14 +6,12 @@ Kind=wireguard
Description=WireGuard tunnel {{ vpn_default.interface }}
[WireGuard]
# PrivateKeyFile option does not seem to work, perhaps a bug?
PrivateKey={{ vpn_default.private_key }}
PrivateKeyFile={{ vpn_default.private_key_path }}
{% for peer in vpn_default.peers %}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
# PresharedKeyFile option does not seem to work, perhaps a bug?
PresharedKey={{ peer.preshared_key }}
PresharedKeyFile={{ peer.preshared_key_path }}
AllowedIPs={{ peer.allowd_ips }}
{% if peer.endpoint %}
Endpoint={{ peer.endpoint }}

View file

@ -6,14 +6,12 @@ Kind=wireguard
Description=WireGuard tunnel {{ vpn_media.interface }}
[WireGuard]
# PrivateKeyFile option does not seem to work, perhaps a bug?
PrivateKey={{ vpn_media.private_key }}
PrivateKeyFile={{ vpn_media.private_key_path }}
{% for peer in vpn_media.peers %}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
# PresharedKeyFile option does not seem to work, perhaps a bug?
PresharedKey={{ peer.preshared_key }}
PresharedKeyFile={{ peer.preshared_key_path }}
AllowedIPs={{ peer.allowd_ips }}
{% if peer.endpoint %}
Endpoint={{ peer.endpoint }}