[bird] Improve init files.
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Fri, 17 Jan 2014 19:24:45 +0000 (20:24 +0100)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Fri, 17 Jan 2014 19:24:45 +0000 (20:24 +0100)
bird/files/bird4.init
bird/files/bird6.init

index 4fbd3022ae9bb36474e308c3bcc0a745265ffb5a..80bc51671759d03732d79301835ff0bc24f076fa 100644 (file)
@@ -1,22 +1,25 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2010-2014 OpenWrt.org
 
+BIRD="bird4"
+
 START=99
 STOP=10
 
 SERVICE_DAEMONIZE=1
 SERVICE_WRITE_PID=1
 
-BIRD="/usr/sbin/bird4 -c /etc/bird4.conf"
+BIRD_BIN="/usr/sbin/$BIRD"
+BIRD_CONF="/etc/$BIRD.conf"
 
 start() {
-       service_start $BIRD -d
+       service_start $BIRD_BIN -d -c $BIRD_CONF
 }
 
 stop() {
-       service_stop $BIRD
+       service_stop $BIRD_BIN
 }
 
 reload() {
-       service_reload $BIRD
+       service_reload $BIRD_BIN
 }
index 9089e006c406db4affc6f465b61368f4a26c1fe4..2b39e3f2b537bb7901fbc423e2876f811d0a0c6a 100644 (file)
@@ -1,22 +1,25 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2010-2014 OpenWrt.org
 
+BIRD="bird6"
+
 START=99
 STOP=10
 
 SERVICE_DAEMONIZE=1
 SERVICE_WRITE_PID=1
 
-BIRD="/usr/sbin/bird6 -c /etc/bird6.conf"
+BIRD_BIN="/usr/sbin/$BIRD"
+BIRD_CONF="/etc/$BIRD.conf"
 
 start() {
-       service_start $BIRD -d
+       service_start $BIRD_BIN -d -c $BIRD_CONF
 }
 
 stop() {
-       service_stop $BIRD
+       service_stop $BIRD_BIN
 }
 
 reload() {
-       service_reload $BIRD
+       service_reload $BIRD_BIN
 }