Skip to content

Commit

Permalink
fixed issues with commits
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanSelen committed Oct 3, 2024
1 parent d4819b1 commit 0c5033f
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 154 deletions.
2 changes: 0 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# WGDashboard Docker Explanation:

Author: DaanSelen<br>

This document delves into how the WGDashboard Docker container has been built.<br>
Expand Down Expand Up @@ -100,7 +99,6 @@ dselen/wgdashboard latest c96fd96ee3b3 42 minutes ago 314MB

## Closing remarks:

Excuse the large image size, whoops! Debian's big... sometimes.<br>
For feedback please submit an issue to the repository. Or message [email protected].

## In Progress:
Expand Down
43 changes: 0 additions & 43 deletions docker/alpine/builder.sh

This file was deleted.

2 changes: 0 additions & 2 deletions docker/alpine/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ensure_installation() {

# This first step is to ensure the wg0.conf file exists, and if not, then its copied over from the ephemeral container storage.
if [ ! -f "/etc/wireguard/wg0.conf" ]; then
echo "Standard wg0 Configuration file not found, grabbing template. And adjusting permissions."
echo "Standard wg0 Configuration file not found, grabbing template."
cp -a "/setup/conf/wg0.conf" "/etc/wireguard/wg0.conf"

echo "Setting a secure private key."
Expand Down
34 changes: 0 additions & 34 deletions src/entrypoint.sh

This file was deleted.

13 changes: 0 additions & 13 deletions src/iptable-rules/postdown.sh

This file was deleted.

26 changes: 0 additions & 26 deletions src/iptable-rules/postup.sh

This file was deleted.

33 changes: 0 additions & 33 deletions src/wgd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -341,22 +341,7 @@ stop_wgd() {
fi
}

startwgd_docker() {
_checkWireguard
printf "[WGDashboard][Docker] WireGuard configuration started\n"
{ date; start_core ; printf "\n\n"; } >> ./log/install.txt
gunicorn_start
}

start_core() {
local iptable_dir="/opt/wireguarddashboard/src/iptable-rules"
# Check if wg0.conf exists in /etc/wireguard
if [[ ! -f /etc/wireguard/wg0.conf ]]; then
echo "[WGDashboard][Docker] wg0.conf not found. Running generate configuration."
newconf_wgd
else
echo "[WGDashboard][Docker] wg0.conf already exists. Skipping WireGuard configuration generation."
fi
# Re-assign config_files to ensure it includes any newly created configurations
local config_files=$(find /etc/wireguard -type f -name "*.conf")

Expand All @@ -371,24 +356,6 @@ start_core() {
done
}



newconf_wgd() {
local wg_port_listen=$wg_port
local wg_addr_range=$wg_net
private_key=$(wg genkey)
public_key=$(echo "$private_key" | wg pubkey)
cat <<EOF >"/etc/wireguard/wg0.conf"
[Interface]
PrivateKey = $private_key
Address = $wg_addr_range
ListenPort = $wg_port_listen
SaveConfig = true
PostUp = /opt/wireguarddashboard/src/iptable-rules/postup.sh
PreDown = /opt/wireguarddashboard/src/iptable-rules/postdown.sh
EOF
}

start_wgd_debug() {
printf "%s\n" "$dashes"
_checkWireguard
Expand Down

0 comments on commit 0c5033f

Please sign in to comment.