Default wg_enabled=0
This commit is contained in:
parent
9d06479695
commit
aa05a2d45b
4
build.sh
4
build.sh
@ -101,10 +101,10 @@ do
|
||||
process_templates "/etc/bind/$netname/" "$sigil_vars"
|
||||
|
||||
# Wireguard
|
||||
if [ "$wg_enabled" -eq "1" ]; then
|
||||
if [ "${wg_enabled:-0}" -eq "1" ]; then
|
||||
# Remove existing configuration
|
||||
rm -v -rf /etc/wireguard/$netname/*
|
||||
# Copy all bind default files to /etc/(bind)
|
||||
# Copy all wireguard default files to /etc/(wireguard)
|
||||
find wireguard -type d | sed -e "s@wireguard@wireguard/${netname}@g" | xargs -I '{}' mkdir --verbose -p /etc/{}
|
||||
find wireguard -type f | sed -e "s@wireguard/@@g" | xargs -I '{}' cp --verbose wireguard/{} /etc/wireguard/$netname/{}
|
||||
# Fill out templates and remove them after
|
||||
|
Loading…
x
Reference in New Issue
Block a user