summaryrefslogtreecommitdiff
path: root/playbooks.d
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-04-20 12:52:06 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-04-20 12:52:06 +0200
commit81c79ae7cb69676936e1d7c7430bc6b56d6309d3 (patch)
tree9bdc91ffd7e52d93acf5d93058b96aff71760346 /playbooks.d
parent12899ff06690e1bd1cf5fd14addf359f5f19e674 (diff)
Update VPN for FreeBSD networks
Diffstat (limited to 'playbooks.d')
-rw-r--r--playbooks.d/vpn/playbook.bash9
1 files changed, 7 insertions, 2 deletions
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