#!/bin/sh /etc/rc.common
+# Copyright (C) 2010-2011 OpenWrt.org
START=50
-# Birdloop is used to restart BIRD if it crashed. Unfortunately, it also
-# hides and handles in the same manner start-time errors (like parse error
-# in config file). Therefore, it is not used by default. If you want to
-# use it, comment the first line and uncomment the second line in start().
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
start() {
- /usr/sbin/bird6
-# /usr/sbin/bird6loop
+ service_start /usr/sbin/bird6 -d
+# ( SERVICE_MATCH_NAME=1 service_start /usr/sbin/bird6loop )
}
stop() {
- killall bird6
- sleep 1
+# ( SERVICE_MATCH_NAME=1 service_stop /usr/sbin/bird6loop )
+ service_stop /usr/sbin/bird6
}
reload() {
- killall -HUP bird6
+ service_reload /usr/sbin/bird6
}