From 5b607df2de8d4ae1f368c3e8592ff9d0a4e77a20 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 12 Apr 2023 14:47:02 +0200 Subject: [PATCH] Add checks if var is set --- .../templates/wg-ipv6-conv.service.jinja2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wireguard-ipv6-converter/templates/wg-ipv6-conv.service.jinja2 b/wireguard-ipv6-converter/templates/wg-ipv6-conv.service.jinja2 index 7d85dcc..e1544a0 100644 --- a/wireguard-ipv6-converter/templates/wg-ipv6-conv.service.jinja2 +++ b/wireguard-ipv6-converter/templates/wg-ipv6-conv.service.jinja2 @@ -15,9 +15,15 @@ Restart=always RestartSec=30 Environment="INTERFACE={{ wireguard_ipv6_converter.setup.interface }}" +{% if wireguard_ipv6_converter.setup.ipv6_format is defined %} Environment="IPV6_FORMAT={{ wireguard_ipv6_converter.setup.ipv6_format }}" +{% endif %} +{% if wireguard_ipv6_converter.setup.filter_prefix is defined %} Environment="FILTER_PREFIX={{ wireguard_ipv6_converter.setup.filter_prefix }}" +{% endif %} +{% if wireguard_ipv6_converter.setup.recheck_interval is defined %} Environment="RECHECK_INTERVAL={{ wireguard_ipv6_converter.setup.recheck_interval }}" +{% endif %} [Install] WantedBy=multi-user.target