Rebuild rego-tunnel-linux with systemd as init
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
This commit is contained in:
31
apps/rego-tunnel-linux/source/rego-vpn-gui.sh
Normal file
31
apps/rego-tunnel-linux/source/rego-vpn-gui.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Main GUI service for Rego VPN
|
||||
|
||||
NOVNC_PORT="${NOVNC_PORT:-8806}"
|
||||
DISPLAY_ADDR="${DISPLAY:-:1}"
|
||||
|
||||
# Start Xvfb
|
||||
Xvfb "$DISPLAY_ADDR" -screen 0 ${XVFB_WxHxD:-1280x800x24} +extension RANDR &
|
||||
XVFB_PID=$!
|
||||
sleep 1
|
||||
|
||||
export DISPLAY="$DISPLAY_ADDR"
|
||||
|
||||
# Start window manager
|
||||
fluxbox >/tmp/fluxbox.log 2>&1 &
|
||||
|
||||
# Start VNC server
|
||||
x11vnc -display "$DISPLAY_ADDR" -rfbauth /root/.vnc/pass -forever -shared -rfbport 5900 -quiet &
|
||||
|
||||
# Start websockify for noVNC
|
||||
websockify --web=/usr/share/novnc/ 0.0.0.0:"$NOVNC_PORT" localhost:5900 >/tmp/websockify.log 2>&1 &
|
||||
|
||||
# Start terminal
|
||||
sleep 1
|
||||
xterm -fa 'Monospace' -fs 11 -bg black -fg white -geometry 120x35+50+50 \
|
||||
-T "Rego VPN" -e bash &
|
||||
|
||||
echo "Rego VPN GUI started on port $NOVNC_PORT"
|
||||
|
||||
# Wait for Xvfb (main process)
|
||||
wait $XVFB_PID
|
||||
Reference in New Issue
Block a user