blob: 5c36865f62a5edd764ac6a2b3d36dbc8ae46013f (
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-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipcad/files/ipcad.init,v 1.3 2006/06/14 13:33:31 pva Exp $
depend() {
need net
}
checkconfig() {
if [ ! -f /etc/ipcad.conf ] ; then
eerror "No /etc/ipcad.conf file exists!"
return 1
fi
`egrep -v "(^#|^$)" /etc/ipcad.conf | grep interface > /dev/null 2>&1` || {
eerror "Please, configure at least one interface in /etc/ipcad.conf." ;
return 1 ;
}
return 0
}
start() {
# Comment out the following line to get faster startups
checkconfig || return 1
ebegin "Starting ipcad"
start-stop-daemon --start --pidfile=/var/ipcad/run/ipcad.pid --exec /usr/sbin/ipcad -- ${IPCAD_OPTS}
eend $?
}
stop () {
ebegin "Stopping ipcad"
start-stop-daemon --stop --pidfile=/var/ipcad/run/ipcad.pid --exec /usr/sbin/ipcad --retry 20
eend $?
}
|