diff options
| author | Yuxiang Zhu <vfreex+github@gmail.com> | 2020-02-09 05:47:13 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-08 22:47:13 +0100 |
| commit | c9ae9c8c509a927f4f76c6455313ec15de2fbe41 (patch) | |
| tree | 57d3c845db4f04f4406dec231db04a24a699a80e /bird2 | |
| parent | c225724e8f8cf19b22e3bd9d03eccf812c28a1c7 (diff) | |
bird2: fix service restart and reload (#546)
`/etc/init.d/bird restart` or `/etc/init.d/bird reload` has no effects.
This PR fixes this issue by:
- running the service in the foreground to meet the requirements of procd
- sending SIGHUP signal to reload the service
Diffstat (limited to 'bird2')
| -rw-r--r-- | bird2/Makefile | 2 | ||||
| -rw-r--r-- | bird2/files/bird.init | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/bird2/Makefile b/bird2/Makefile index cad2ddd..fc3d1c2 100644 --- a/bird2/Makefile +++ b/bird2/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bird2 PKG_VERSION:=2.0.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird diff --git a/bird2/files/bird.init b/bird2/files/bird.init index 18db4af..5f7a442 100644 --- a/bird2/files/bird.init +++ b/bird2/files/bird.init @@ -11,10 +11,14 @@ BIRD_PID_FILE="/var/run/bird.pid" start_service() { mkdir -p /var/run procd_open_instance - procd_set_param command $BIRD_BIN -c $BIRD_CONF -P $BIRD_PID_FILE + 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 +} |
