Commit 17a35042 authored by Stephan's avatar Stephan
Browse files

bmxd: only count bmxd processes

parent 5ad1dbb3
Pipeline #1672 passed with stages
in 93 minutes and 3 seconds
......@@ -160,6 +160,10 @@ case "$ARG1" in
fi
fi
# too many instances running (count no zombies)
bmxd_count=$(ps | awk '{ if(match($4,"Z")==0 && (match($5,"^bmxd$") || match($5,"^/usr/bin/bmxd$")) ){print $5}}' | wc -l)
test "$bmxd_count" -gt 4 && logger -s -t "$TAG" "bmxd: too many instances ($bmxd_count)" && bmxd_restart=1
test $bmxd_restart = 1 && logger -s -t "$TAG" "$DAEMON not running - restart" && $0 restart
;;
......
......@@ -158,6 +158,9 @@ case "$ARG1" in
bmxd_restart=1
fi
fi
# too many instances running (count no zombies)
bmxd_count=$(ps | awk '{ if(match($4,"Z")==0 && (match($5,"^bmxd$") || match($5,"^/usr/bin/bmxd$")) ){print $5}}' | wc -l)
test "$bmxd_count" -gt 4 && logger -s -t "$TAG" "bmxd: too many instances ($bmxd_count)" && bmxd_restart=1
test $bmxd_restart = 1 && logger -s -t "$TAG" "$DAEMON not running - restart" && $0 restart
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment