Update alpine-wireguard-install.sh
This commit is contained in:
parent
216be65896
commit
79f6b41af5
@ -21,9 +21,6 @@ $STD apk add \
|
|||||||
nano \
|
nano \
|
||||||
mc \
|
mc \
|
||||||
gpg \
|
gpg \
|
||||||
git \
|
|
||||||
python3 \
|
|
||||||
py3-pip \
|
|
||||||
iptables \
|
iptables \
|
||||||
supervisor
|
supervisor
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
@ -34,6 +31,17 @@ msg_ok "Installed WireGuard"
|
|||||||
|
|
||||||
read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD
|
read -rp "Do you want to install WGDashboard? (y/N): " INSTALL_WGD
|
||||||
if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then
|
if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then
|
||||||
|
msg_info "Installing additional dependencies for WGDashboard"
|
||||||
|
apk add --no-cache \
|
||||||
|
python3 \
|
||||||
|
py3-pip \
|
||||||
|
git \
|
||||||
|
sudo \
|
||||||
|
musl-dev \
|
||||||
|
linux-headers \
|
||||||
|
gcc \
|
||||||
|
python3-dev
|
||||||
|
msg_ok "Installed additional dependencies for WGDashboard"
|
||||||
msg_info "Installing WGDashboard"
|
msg_info "Installing WGDashboard"
|
||||||
git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard
|
git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard
|
||||||
cd /etc/wgdashboard/src || exit
|
cd /etc/wgdashboard/src || exit
|
||||||
@ -56,8 +64,10 @@ ListenPort = 51820
|
|||||||
EOF
|
EOF
|
||||||
msg_ok "Created Example Config for WGDashboard"
|
msg_ok "Created Example Config for WGDashboard"
|
||||||
|
|
||||||
msg_info "Creating Supervisor Service for WGDashboard"
|
msg_info "Creating Supervisor Service for WGDashboard"
|
||||||
cat <<EOF >/etc/supervisor.d/wg-dashboard.ini
|
mkdir -p /etc/supervisord.d/
|
||||||
|
|
||||||
|
cat <<EOF > /etc/supervisord.d/wg-dashboard.ini
|
||||||
[program:wg-dashboard]
|
[program:wg-dashboard]
|
||||||
command=/etc/wgdashboard/src/wgd.sh start
|
command=/etc/wgdashboard/src/wgd.sh start
|
||||||
autostart=true
|
autostart=true
|
||||||
@ -66,9 +76,10 @@ stderr_logfile=/var/log/wg-dashboard.err.log
|
|||||||
stdout_logfile=/var/log/wg-dashboard.out.log
|
stdout_logfile=/var/log/wg-dashboard.out.log
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
rc-service supervisor restart
|
rc-service supervisor restart
|
||||||
rc-update add supervisor default
|
rc-update add supervisor default
|
||||||
msg_ok "Created Supervisor Service for WGDashboard"
|
msg_ok "Created Supervisor Service for WGDashboard"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user