mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 15:20:09 +01:00
Update wgd.sh
This commit is contained in:
parent
c27de8b9a5
commit
d7e5e2f381
11
src/wgd.sh
11
src/wgd.sh
@ -224,6 +224,12 @@ install_wgd(){
|
|||||||
_checkWireguard
|
_checkWireguard
|
||||||
sudo chmod -R 755 /etc/wireguard/
|
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" ]
|
if [ ! -d "log" ]
|
||||||
then
|
then
|
||||||
printf "[WGDashboard] Creating ./log folder\n"
|
printf "[WGDashboard] Creating ./log folder\n"
|
||||||
@ -321,6 +327,7 @@ stop_wgd() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ============= Docker Functions =============
|
||||||
startwgd_docker() {
|
startwgd_docker() {
|
||||||
_checkWireguard
|
_checkWireguard
|
||||||
printf "[WGDashboard][Docker] WireGuard configuration started\n"
|
printf "[WGDashboard][Docker] WireGuard configuration started\n"
|
||||||
@ -351,8 +358,6 @@ start_core() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
newconf_wgd() {
|
newconf_wgd() {
|
||||||
local wg_port_listen=$wg_port
|
local wg_port_listen=$wg_port
|
||||||
local wg_addr_range=$wg_net
|
local wg_addr_range=$wg_net
|
||||||
@ -369,6 +374,8 @@ PreDown = /opt/wireguarddashboard/src/iptable-rules/postdown.sh
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ============= Docker Functions =============
|
||||||
|
|
||||||
start_wgd_debug() {
|
start_wgd_debug() {
|
||||||
printf "%s\n" "$dashes"
|
printf "%s\n" "$dashes"
|
||||||
_checkWireguard
|
_checkWireguard
|
||||||
|
Loading…
Reference in New Issue
Block a user