Finish up first pass at WG
This commit is contained in:
parent
85841e45cc
commit
f4329c810d
2
build.sh
2
build.sh
@ -101,6 +101,7 @@ do
|
|||||||
process_templates "/etc/bind/$netname/" "$sigil_vars"
|
process_templates "/etc/bind/$netname/" "$sigil_vars"
|
||||||
|
|
||||||
# Wireguard
|
# Wireguard
|
||||||
|
if [ $wg_enabled -eq "1" ]; then
|
||||||
# Remove existing configuration
|
# Remove existing configuration
|
||||||
rm -v -rf /etc/wireguard/$netname/*
|
rm -v -rf /etc/wireguard/$netname/*
|
||||||
# Copy all bind default files to /etc/(bind)
|
# 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/{}
|
find wireguard -type f | sed -e "s@wireguard/@@g" | xargs -I '{}' cp --verbose wireguard/{} /etc/wireguard/$netname/{}
|
||||||
# Fill out templates and remove them after
|
# Fill out templates and remove them after
|
||||||
process_templates "/etc/wireguard/$netname/" "$sigil_vars"
|
process_templates "/etc/wireguard/$netname/" "$sigil_vars"
|
||||||
|
fi
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
# Copy templates and dependencies to directory
|
# Copy templates and dependencies to directory
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
image: ghcr.io/linuxserver/wireguard
|
{{ if eq "1" "${wg_enabled:-0}" }} image: ghcr.io/linuxserver/wireguard
|
||||||
container_name: wireguard
|
container_name: wireguard
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/wireguard/${netname}:/config
|
- /etc/wireguard/${netname}:/config
|
||||||
@ -16,4 +16,4 @@
|
|||||||
depends_on:
|
depends_on:
|
||||||
- tinc
|
- tinc
|
||||||
sysctls:
|
sysctls:
|
||||||
- net.ipv4.conf.all.src_valid_mark=1
|
- net.ipv4.conf.all.src_valid_mark=1{{ end }}
|
Loading…
x
Reference in New Issue
Block a user