summaryrefslogtreecommitdiff
path: root/olsrd
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2021-08-01 10:22:49 +0200
committerPolynomdivision <vincent@systemli.org>2021-08-01 10:41:32 +0200
commit775d030a58c90f6cf8105823da03d36654012fc2 (patch)
tree724c1fc327f11f6771ba12efbb339d0f837bda09 /olsrd
parentbc58bd99e81b72f8061473eec5d3454b3504b163 (diff)
olsrd: make respawn_threshold configurable
Also make respawn_threshold configurable. Further, add default values for: - respawn_threshold 3600 - respawn_timeout 15 - respawn_retry 0 Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'olsrd')
-rw-r--r--olsrd/files/olsrd.config1
-rw-r--r--olsrd/files/olsrd4.init12
-rw-r--r--olsrd/files/olsrd6.config1
-rw-r--r--olsrd/files/olsrd6.init8
4 files changed, 14 insertions, 8 deletions
diff --git a/olsrd/files/olsrd.config b/olsrd/files/olsrd.config
index 25812fa..483ce1a 100644
--- a/olsrd/files/olsrd.config
+++ b/olsrd/files/olsrd.config
@@ -24,5 +24,6 @@ config Interface
list interface 'wlan'
config procd general
+ option respawn_threshold '3600'
option respawn_timeout '15'
option respawn_retry '0'
diff --git a/olsrd/files/olsrd4.init b/olsrd/files/olsrd4.init
index 03836eb..67f6957 100644
--- a/olsrd/files/olsrd4.init
+++ b/olsrd/files/olsrd4.init
@@ -28,19 +28,21 @@ start_service() {
procd_open_instance
config_load olsrd
+ local _respawn_threshold
local _respawn_timeout
local _respawn_retry
-
- config_get _respawn_timeout general respawn_timeout
- config_get _respawn_retry general respawn_retry
-
+
+ config_get _respawn_threshold general respawn_threshold 3600
+ config_get _respawn_timeout general respawn_timeout 15
+ config_get _respawn_retry general respawn_retry 0
+
procd_set_param command "$BIN"
procd_append_param command -f ${CONF}
procd_append_param command -nofork
procd_append_param command -pidfile ${PID}
# restart if olsrd dies
- procd_set_param respawn 3600 $_respawn_timeout $_respawn_retry
+ procd_set_param respawn $_respawn_threshold $_respawn_timeout $_respawn_retry
# automatically restart olsrd if generated cfg has changed
procd_set_param file $CONF
diff --git a/olsrd/files/olsrd6.config b/olsrd/files/olsrd6.config
index 57ae698..9721a84 100644
--- a/olsrd/files/olsrd6.config
+++ b/olsrd/files/olsrd6.config
@@ -11,5 +11,6 @@ config Interface
list interface 'wlan'
config procd general
+ option respawn_threshold '3600'
option respawn_timeout '15'
option respawn_retry '0'
diff --git a/olsrd/files/olsrd6.init b/olsrd/files/olsrd6.init
index 77b68e8..fd7eb5e 100644
--- a/olsrd/files/olsrd6.init
+++ b/olsrd/files/olsrd6.init
@@ -28,11 +28,13 @@ start_service() {
procd_open_instance
config_load olsrd6
+ local _respawn_threshold
local _respawn_timeout
local _respawn_retry
- config_get _respawn_timeout general respawn_timeout
- config_get _respawn_retry general respawn_retry
+ config_get _respawn_threshold general _respawn_threshold 3600
+ config_get _respawn_timeout general respawn_timeout 15
+ config_get _respawn_retry general respawn_retry 0
procd_set_param command "$BIN"
procd_append_param command -f ${CONF}
@@ -40,7 +42,7 @@ start_service() {
procd_append_param command -pidfile ${PID}
# restart if olsrd dies
- procd_set_param respawn 3600 $_respawn_timeout $_respawn_retry
+ procd_set_param respawn $_respawn_threshold $_respawn_timeout $_respawn_retry
# automatically restart olsrd if generated cfg has changed
procd_set_param file $CONF