Portability of checking server status

pull/329/head
default 9 months ago
parent d619e6570b
commit eff921ecd0
No known key found for this signature in database

@ -181,10 +181,11 @@ echo -e "password\npassword\n" | vncpasswd -wo -u "$USER"
# Start the server
printf "🚀 Starting KasmVNC server...\n"
vncserver -select-de "${DESKTOP_ENVIRONMENT}" -disableBasicAuth > /tmp/kasmvncserver.log 2>&1 &
pid=$!
# Wait for server to start
sleep 5
if ! pgrep -f vncserver > /dev/null; then
if ps -p $pid | grep -q "^$pid"; then
echo "ERROR: Failed to start KasmVNC server. Check logs at /tmp/kasmvncserver.log"
grep -v '^[[:space:]]*$' /tmp/kasmvncserver.log
exit 1

Loading…
Cancel
Save