From: Michael Tremer Date: Sun, 23 Jun 2019 10:33:48 +0000 (+0000) Subject: bird: Start service when needed and not already running X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d99f882ea0f8c4b1c55f7107067a0cb35fedfb3;p=people%2Fms%2Fnetwork.git bird: Start service when needed and not already running Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.bird b/src/functions/functions.bird index 55d43b58..cbcb6e27 100644 --- a/src/functions/functions.bird +++ b/src/functions/functions.bird @@ -21,6 +21,10 @@ BIRD_CONF="/etc/bird.conf" +bird_is_active() { + service_is_active "bird.service" +} + bird_start() { service_start "bird.service" } @@ -41,7 +45,11 @@ bird_update() { fi # Reload bird - bird_reload + if bird_is_active; then + bird_reload + else + bird_start + fi } bird_generate_config() {