File: S99mon

package info (click to toggle)
mon 0.38.15-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 708 kB
  • ctags: 238
  • sloc: perl: 6,458; ansic: 774; sh: 332; makefile: 112
file content (29 lines) | stat: -rwxr-xr-x 411 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

#
# You probably want to set the path to include
# nothing but local filesystems.
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
export PATH

M=/usr/lib/mon
PID=/var/run/mon.pid

case "$1" in
    start)
	if [ -x $M/mon ]
	then
	    $M/mon -c $M/mon.cf -a $M/alert.d \
	    	-s $M/mon.d -f 2>/dev/null
	fi
	;;
    stop)
	kill -TERM `cat $PID`
	;;
    *)
    	echo "Usage: mon {start|stop}"
	exit 1
esac

exit 0