[yocto] [yocto-autobuilder][PATCH] checkvnc: use netstat to detect running vncserver
Joshua Lock
joshua.g.lock at intel.com
Mon Sep 12 06:47:06 PDT 2016
Using `pidof Xvnc` isn't sufficient because on debian-based distros
the vncserver script will start Xtightvnc.
Instead switch back to using netstat for the VNC tcp socket to
detect a running vncserver.
[YOCTO #10257]
Signed-off-by: Joshua Lock <joshua.g.lock at intel.com>
---
bin/checkvnc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/checkvnc b/bin/checkvnc
index 728031f..d934dfa 100755
--- a/bin/checkvnc
+++ b/bin/checkvnc
@@ -2,7 +2,7 @@
#
# check if vnc server is running, and if not, cleanup and restart
#
-pid=$(pidof Xvnc)
+netstat -tnl | grep :5901 > /dev/null
if [ $? != 0 ]; then
echo "Xvnc not running, attempting restart"
vncserver -kill :1
--
2.7.4
More information about the yocto
mailing list