1
0
mirror of https://git.openwrt.org/feed/routing.git synced 2024-06-16 12:14:10 +02:00
openwrt-routing/bird2/files/bird.init
Stijn Tintel 0fd4ed1d3e bird2: stop service early
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>
2022-04-27 11:31:48 +03:00

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
}