blob: b406439c4b293c73ca81ffacba62c1ca652012cd (
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
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
|
#! /bin/bash
#
# exilog exim log analizator daemon
#
# chkconfig: - 90 10
# description: exilog is exim log analyzator daemon
# processname: exilog
# pidfile: /var/run/exilog-agent.pid
# config: /etc/exilog/exilog.conf
# Source function library.
WITHOUT_RC_COMPAT=1
. /etc/init.d/functions
LOCKFILE=/var/lock/exilog
RETVAL=0
start()
{
/usr/sbin/exilog_agent.pl >> /var/log/exilog_agent.log 2 >&1
}
stop()
{
/bin/kill -s 15 `cat /var/run/exilog/agent.pid`
}
status()
{
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
status)
status
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condreload|condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|status|condstop|condreload|condrestart}"
RETVAL=1
esac
exit $RETVAL
|