Update alpine-wireguard-install.sh

This commit is contained in:
CanbiZ 2025-03-25 14:04:20 +01:00
parent e659b4495a
commit cf3601b4ab

View File

@ -64,10 +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"
mkdir -p /etc/supervisord.d/ mkdir -p /etc/supervisord.d/
cat <<EOF > /etc/supervisord.d/wg-dashboard.ini 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
@ -76,9 +76,19 @@ 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 if [[ ! -f /etc/supervisord.conf ]]; then
rc-update add supervisor default cat <<EOF > /etc/supervisord.conf
msg_ok "Created Supervisor Service for WGDashboard" [supervisord]
nodaemon=true
[include]
files = /etc/supervisord.d/*.ini
EOF
fi
msg_info "Starting Supervisor Daemon"
nohup supervisord -c /etc/supervisord.conf &>/dev/null &
msg_ok "Started Supervisor Daemon"
fi fi