mirror of
https://github.com/openwrt/routing.git
synced 2025-02-23 12:46:14 +00:00
The bird service needs to stop before network is stopped, otherwise it might not be able to cleanly terminate its sessions. Introduce STOP=10 as is used in the bird1 init scripts. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
26 lines
519 B
Bash
26 lines
519 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2010-2017 OpenWrt.org
|
|
|
|
USE_PROCD=1
|
|
START=70
|
|
STOP=10
|
|
|
|
BIRD_BIN="/usr/sbin/bird"
|
|
BIRD_CONF="/etc/bird.conf"
|
|
BIRD_PID_FILE="/var/run/bird.pid"
|
|
|
|
start_service() {
|
|
mkdir -p /var/run
|
|
procd_open_instance
|
|
procd_set_param command $BIRD_BIN -f -c $BIRD_CONF -P $BIRD_PID_FILE
|
|
procd_set_param file "$BIRD_CONF"
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_set_param respawn
|
|
procd_close_instance
|
|
}
|
|
|
|
reload_service() {
|
|
procd_send_signal bird
|
|
}
|