blob: bb7122ea1445fd72a4b01c361d788ac31c490069 (
plain)
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
|
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/mon/files/mon.rc6,v 1.7 2007/07/09 22:47:42 uberlord Exp $
depend() {
need clock
after logger
}
checkconfig() {
if [ ! -e /etc/mon/mon.cf ] ; then
eerror "You need an /etc/mon/mon.cf file to run mon"
eerror "There is a sample at /etc/mon/mon.cf.sample"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting mon"
start-stop-daemon --start --exec /usr/sbin/mon \
--pidfile /var/run/mon.pid \
-- -P /var/run/mon.pid -f
eend $?
}
stop() {
ebegin "Stopping mon"
start-stop-daemon --stop --pidfile /var/run/mon.pid
eend $?
}
|