This file is indexed.

/usr/lib/xymon/server/bin/xymon.sh is in xymon 4.3.28-3build1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
#!/bin/sh

# Startup script for Xymon
#
# This starts the "xymonlaunch" tool, which in turn starts
# all of the other Xymon server programs.

case "`uname -s`" in
   "SunOS")
   	ID=/usr/xpg4/bin/id
	;;
   *)
   	ID=id
	;;
esac

if test `$ID -un` != xymon
then
	echo "Xymon must be started as the xymon user"
	exit 1
fi

case "$1" in
   "start")
	if test -s /var/log/xymon/xymonlaunch.pid
	then
		kill -0 `cat /var/log/xymon/xymonlaunch.pid`
		if test $? -eq 0
		then
			echo "Xymon appears to be running, doing restart"
			$0 stop
		else
			rm -f /var/log/xymon/xymonlaunch.pid
		fi
	fi

	 /usr/lib/xymon/server/bin/xymonlaunch --config=/usr/lib/xymon/server/etc/tasks.cfg --env=/usr/lib/xymon/server/etc/xymonserver.cfg --log=/var/log/xymon/xymonlaunch.log --pidfile=/var/log/xymon/xymonlaunch.pid
	echo "Xymon started"
	;;

   "stop")
	if test -s /var/log/xymon/xymonlaunch.pid
	then
		kill -TERM `cat /var/log/xymon/xymonlaunch.pid`
		echo "Xymon stopped"
	else
		echo "Xymon is not running"
	fi
	rm -f /var/log/xymon/xymonlaunch.pid
	;;

   "status")
	if test -s /var/log/xymon/xymonlaunch.pid
	then
		kill -0 `cat /var/log/xymon/xymonlaunch.pid`
		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
	;;

   "restart")
	if test -s /var/log/xymon/xymonlaunch.pid
	then
		$0 stop
		sleep 10
		$0 start
	else
		echo "xymonlaunch does not appear to be running, starting it"
		$0 start
	fi
	;;

   "reload")
	if test -s /var/log/xymon/xymond.pid
	then
		kill -HUP `cat /var/log/xymon/xymond.pid`
	else
		echo "xymond not running (no PID file)"
	fi
	;;

   "rotate")
   	for PIDFILE in /var/log/xymon/*.pid
	do
		kill -HUP `cat $PIDFILE`
	done
	;;

   *)
   	echo "Usage: $0 start|stop|restart|reload|status|rotate"
	break;
esac

exit 0