From 4c8f2edbfebbad3d224253c139da537f03f1859e Mon Sep 17 00:00:00 2001 From: "G. H. Chinoy" Date: Sun, 2 Aug 2026 12:28:16 -0600 Subject: [PATCH] fix(init): guard against duplicate jibo-system-manager starts --- include/root/etc/init.d/S78jibo-system-manager | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/root/etc/init.d/S78jibo-system-manager b/include/root/etc/init.d/S78jibo-system-manager index 92349f7..a2ced05 100644 --- a/include/root/etc/init.d/S78jibo-system-manager +++ b/include/root/etc/init.d/S78jibo-system-manager @@ -34,7 +34,7 @@ check_mode() { } check_running() { - pgrep -x jibo-system-man >& /dev/null + pgrep -f "$BIN_DIR/$PROCESS" > /dev/null 2>&1 return $? } @@ -46,8 +46,12 @@ wait_for_stopped() { } start() { - echo -n "Starting $PROCESS: " check_mode + if check_running; then + echo "jibo-system-manager is ALREADY RUNNING (PID: $(pgrep -f "$BIN_DIR/$PROCESS"))" + return 0 + fi + echo -n "Starting $PROCESS: " $BIN_DIR/$PROCESS -c $CFG_DIR/$PROCESS.json --daemon test $? -eq 0 && echo "OK" || echo "ERROR" } -- 2.43.0