From d7e5e2f381d3f36d1e3939e692898a5902094da4 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 26 Oct 2024 18:09:42 +0800 Subject: [PATCH] Update wgd.sh --- src/wgd.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wgd.sh b/src/wgd.sh index 6f277a2..0267b43 100755 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -224,6 +224,12 @@ install_wgd(){ _checkWireguard sudo chmod -R 755 /etc/wireguard/ + if [ ! -d "/etc/wireguard/WGDashboard_Backup" ] + then + printf "[WGDashboard] Creating /etc/wireguard/WGDashboard_Backup folder\n" + mkdir "/etc/wireguard/WGDashboard_Backup" + fi + if [ ! -d "log" ] then printf "[WGDashboard] Creating ./log folder\n" @@ -321,6 +327,7 @@ stop_wgd() { fi } +# ============= Docker Functions ============= startwgd_docker() { _checkWireguard printf "[WGDashboard][Docker] WireGuard configuration started\n" @@ -351,8 +358,6 @@ start_core() { done } - - newconf_wgd() { local wg_port_listen=$wg_port local wg_addr_range=$wg_net @@ -369,6 +374,8 @@ PreDown = /opt/wireguarddashboard/src/iptable-rules/postdown.sh EOF } +# ============= Docker Functions ============= + start_wgd_debug() { printf "%s\n" "$dashes" _checkWireguard