Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Firmware-Developer
Firmware
Commits
af41b8dc
Commit
af41b8dc
authored
Apr 30, 2021
by
Stephan
Browse files
add bmxd timeout check
parent
e15533bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
files/common/usr/lib/ddmesh/ddmesh-bmxd.sh
View file @
af41b8dc
...
...
@@ -8,7 +8,6 @@ DAEMON_PATH=/usr/bin
test
-x
$DAEMON_PATH
/
$DAEMON
||
exit
0
RUN_STATUS_FILE
=
/var/run/batman-status-running
DB_PATH
=
/var/lib/ddmesh/bmxd
STAT_DIR
=
/var/statistic
...
...
@@ -128,17 +127,17 @@ case "$ARG1" in
$DAEMON_PATH
/
$DAEMON
-c
dev
=
-
$ARG2
;;
check
)
# connection check; if bmxd hangs, kill it
timeout
-t
10
-s
9
$DAEMON
-ci
||
killall
-9
$DAEMON
test
-z
"
$(
pidof
$DAEMON
)
"
&&
logger
-s
"
$DAEMON
not running - restart"
&&
$0
restart
&&
exit
test
-n
"
$(
pidof
$DAEMON
)
"
&&
test
!
-f
"
$RUN_STATUS_FILE
"
&&
(
touch
$RUN_STATUS_FILE
$DAEMON_PATH
/
$DAEMON
-c
--gateways
>
$DB_PATH
/gateways
$DAEMON_PATH
/
$DAEMON
-c
--links
>
$DB_PATH
/links
$DAEMON_PATH
/
$DAEMON
-c
--originators
>
$DB_PATH
/originators
$DAEMON_PATH
/
$DAEMON
-c
--status
>
$DB_PATH
/status
# $DAEMON_PATH/$DAEMON -c --networks > $DB_PATH/networks
$DAEMON_PATH
/
$DAEMON
-ci
>
$DB_PATH
/info
rm
$RUN_STATUS_FILE
)
;;
...
...
files/common/usr/lib/ddmesh/ddmesh-tasks.sh
View file @
af41b8dc
...
...
@@ -50,7 +50,6 @@ call_task()
task_bmxd
()
{
test
$(
pidof bmxd |
wc
-w
)
-gt
5
&&
kill
-9
$(
pidof bmxd
)
&&
logger
-t
$TAG
"bmxd: ERROR bmxd dead - bmxd killed"
# check
WD_FILE
=
/tmp/state/bmxd.watchdog
MAX_BMXD_TIME
=
120
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment