Finish up first pass at WG

This commit is contained in:
Manevolent 2021-09-21 15:17:59 -06:00
parent 85841e45cc
commit f4329c810d
No known key found for this signature in database
GPG Key ID: 2E9B7592DFA4F344
2 changed files with 11 additions and 9 deletions

View File

@ -101,6 +101,7 @@ do
process_templates "/etc/bind/$netname/" "$sigil_vars"
# Wireguard
if [ $wg_enabled -eq "1" ]; then
# Remove existing configuration
rm -v -rf /etc/wireguard/$netname/*
# Copy all bind default files to /etc/(bind)
@ -108,6 +109,7 @@ do
find wireguard -type f | sed -e "s@wireguard/@@g" | xargs -I '{}' cp --verbose wireguard/{} /etc/wireguard/$netname/{}
# Fill out templates and remove them after
process_templates "/etc/wireguard/$netname/" "$sigil_vars"
fi
# Docker
# Copy templates and dependencies to directory

View File

@ -1,4 +1,4 @@
image: ghcr.io/linuxserver/wireguard
{{ if eq "1" "${wg_enabled:-0}" }} image: ghcr.io/linuxserver/wireguard
container_name: wireguard
volumes:
- /etc/wireguard/${netname}:/config
@ -16,4 +16,4 @@
depends_on:
- tinc
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.conf.all.src_valid_mark=1{{ end }}