aboutsummaryrefslogtreecommitdiffstats
path: root/main/quagga/bgpd.initd
blob: bd1e4c6c923839a1f288a8ca7a1e71085f18405a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/sbin/openrc-run

piddir=/var/run/quagga
pidfile=$piddir/$SVCNAME.pid
command=/usr/sbin/$SVCNAME
command_args="-d -f /etc/quagga/$SVCNAME.conf --pid_file $pidfile"

depend() {
	need net zebra
	after firewall opennhrp
}

start_pre() {
	if ! [ -e /etc/quagga/$SVCNAME.conf ] ; then
		eerror "You need to create /etc/quagga/$SVCNAME.conf first."
		eerror "An example can be found in /usr/share/doc/quagga/$SVCNAME.conf.sample"
		eerror "from quagga-doc package"
		return 1
	fi
	checkpath --owner quagga:quagga --directory $piddir
}