blob: e8b816237815845807816ecf31ff121c65e32298 (
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
|
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/iplog/files/iplog.rc6,v 1.1 2003/10/27 05:50:50 robbat2 Exp $
depend() {
need net
}
pidfile=/var/run/iplog.pid
start() {
ebegin "Starting iplog"
checkconfig
rc=$?
if [ $rc -eq 0 ]; then
start-stop-daemon --start --quiet --startas /usr/sbin/iplog \
--pidfile=${pidfile} --name=iplog
rc=$?
eend $rc "Failed to start iplog $rc"
else
eend $rc "/etc/iplog.conf does not exist!"
fi
}
stop() {
ebegin "Stopping iplog"
start-stop-daemon --stop --retry=5 --quiet --pidfile=${pidfile} --name=iplog
# due to a bug in the program, it doesn't properly remove it's pidfile sometimes
rm -f ${pidfile}
eend $? "Failed to stop iplog!"
}
checkconfig() {
[ -f /etc/iplog.conf ] || return 1
return 0
}
|