From 81c79ae7cb69676936e1d7c7430bc6b56d6309d3 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Wed, 20 Apr 2022 12:52:06 +0200
Subject: Update VPN for FreeBSD networks
---
playbooks.d/vpn/playbook.bash | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
(limited to 'playbooks.d/vpn')
diff --git a/playbooks.d/vpn/playbook.bash b/playbooks.d/vpn/playbook.bash
index ad85772..0bbb004 100644
--- a/playbooks.d/vpn/playbook.bash
+++ b/playbooks.d/vpn/playbook.bash
@@ -32,11 +32,11 @@ playbook_add()
> "$dir/tinc.conf"
file_template "tinc-up-$iptool" \
- "ip=$(config "vpn.ipv4")" \
+ "ip4=$(config "vpn.ipv4")" \
> "$dir/tinc-up"
file_template "tinc-down-$iptool" \
- "ip=$(config "vpn.ipv4")" \
+ "ip4=$(config "vpn.ipv4")" \
> "$dir/tinc-down"
file_template "host" \
@@ -70,6 +70,11 @@ playbook_add()
info "$BASHTARD_PLAYBOOK" "Enabling VPN service"
case "${BASHTARD_PLATFORM[key]}" in
+ freebsd)
+ if ! grep -Fq 'tincd_cfg="tyilnet"' "/etc/rc.conf.d/tincd"
+ then
+ printf 'tincd_cfg="%s"\n' "tyilnet" >> "/etc/rc.conf.d/tincd"
+ fi
linux-gentoo)
if ! grep -Fq "NETWORK: tyilnet" /etc/conf.d/tinc.networks
then
--
cgit v1.1