summaryrefslogtreecommitdiffstats
path: root/testing/ifplugd/ifplugd.initd
blob: c5b8ec53d2bb2c2b5350c6e03b75d283916e116c (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 or later
# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/ifplugd.init,v 1.2 2007/02/25 09:57:18 mrness Exp $

depend() {
	need net
	after firewall opennhrp
}

checkconfig() {
        if [ ! -e /etc/ifplugd/ifplugd.conf ] ; then
        	eerror "You need to create /etc/ifplugd/ifplugd.conf first."
          return 1
        fi
}

start() {
	checkconfig || return 1

	ebegin "Starting ifplugd"
	sh /usr/sbin/ifplugd-helper start
	result=$?
	eend $result
}

stop() {
	ebegin "Stopping ifplugd"
	sh /usr/sbin/ifplugd-helper stop
	result=$?
	eend $result
}