[Xymon] xymon.sh: add return codes for status

Nikolai Lifanov lifanov at mail.lifanov.com
Wed Jan 27 21:00:14 CET 2016


Can you please add LSB return codes to either the init script or
xymon.sh please? A sample implementation:

--- trunk/files/xymon/usr/lib/xymon/server/bin/xymon.sh	Wed Jan 27
14:41:07 2016	(r6869)
+++ trunk/files/xymon/usr/lib/xymon/server/bin/xymon.sh	Wed Jan 27
14:42:58 2016	(r6870)
@@ -56,12 +56,15 @@
 		if test $? -eq 0
 		then
 			echo "Xymon (xymonlaunch) running with PID `cat
/var/log/xymon/xymonlaunch.pid`"
+			exit 0
 		else
 			echo "Xymon not running, removing stale PID file"
 			rm -f /var/log/xymon/xymonlaunch.pid
+			exit 1
 		fi
 	else
 		echo "Xymon (xymonlaunch) does not appear to be running"
+		exit 3
 	fi
 	;;


See "status" under this page:
http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html



More information about the Xymon mailing list