10 lines
882 B
Bash
10 lines
882 B
Bash
#!/bin/sh
|
|
# B13W: wayvnc on the running compositor's physical output (SPI-1). Bind 172.16.42.1 (USB NCM mgmt) only; auth = VeNCrypt TLS + user/password.
|
|
# Config /etc/aurora/wayvnc/config (root 600): address, port, enable_auth, username, password, private_key_file, certificate_file.
|
|
. /usr/local/lib/b13/run/wl-common.sh
|
|
W=$(cat $S/wayland-display 2>/dev/null); [ -n "$W" ] && [ -S $XDG_RUNTIME_DIR/$W ] || { log "FAIL: no compositor running"; exit 1; }
|
|
pidof wayvnc >/dev/null && { log "wayvnc already running"; exit 0; }
|
|
WAYLAND_DISPLAY=$W setsid wayvnc -C /etc/aurora/wayvnc/config -o SPI-1 -S $S/wayvnc.sock -v > $S/wayvnc.log 2>&1 < /dev/null &
|
|
echo $! > $S/wayvnc.pid; sleep 3
|
|
pidof wayvnc >/dev/null || { log "FAIL: wayvnc exited"; tail -15 $S/wayvnc.log; exit 1; }
|
|
log "WAYVNC UP on $W pid=$(pidof wayvnc) listen=[$(netstat -ltn | awk '$4 ~ /:5900$/ {printf "%s ", $4}')]"
|