refactor(rego-tunnel): Inline startup-vnc.sh and vnc.service in Dockerfile
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
These two files cannot be overridden at runtime, so they're now baked directly into the Dockerfile using heredocs. Remaining scripts (can be overridden at runtime): - init-vpn.sh - xstartup - vpn-connect.sh Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# VNC and noVNC startup script
|
||||
|
||||
set -e
|
||||
|
||||
export HOME=/root
|
||||
export USER=root
|
||||
|
||||
# Clean up any existing VNC locks
|
||||
rm -f /tmp/.X1-lock /tmp/.X11-unix/X1 2>/dev/null || true
|
||||
rm -rf /tmp/.X*-lock /tmp/.X11-unix/* 2>/dev/null || true
|
||||
|
||||
echo "Starting TigerVNC server on display :1..."
|
||||
vncserver :1 \
|
||||
-geometry 1280x800 \
|
||||
-depth 24 \
|
||||
-SecurityTypes VncAuth \
|
||||
-localhost no
|
||||
|
||||
sleep 2
|
||||
|
||||
echo "Starting noVNC on port ${NOVNC_PORT:-6080}..."
|
||||
websockify --web=/usr/share/novnc/ ${NOVNC_PORT:-6080} localhost:5901 &
|
||||
|
||||
echo ""
|
||||
echo "============================================"
|
||||
echo "VNC server running on port 5901"
|
||||
echo "noVNC web interface: http://localhost:${NOVNC_PORT:-6080}/vnc.html"
|
||||
echo "============================================"
|
||||
echo ""
|
||||
|
||||
# Keep the script running
|
||||
tail -f /root/.vnc/*.log
|
||||
@@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=VNC and noVNC Server
|
||||
After=network.target vpnagentd.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/scripts/startup-vnc.sh
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Environment=HOME=/root
|
||||
Environment=USER=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user