From 707c816471fcba05b45190a08da9ee414b9f76d3 Mon Sep 17 00:00:00 2001 From: Yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:06:00 -0400 Subject: [PATCH] Start service cleanly on first Buildroot install --- buildroot-manage.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/buildroot-manage.sh b/buildroot-manage.sh index 6a0aa68..af4f43a 100644 --- a/buildroot-manage.sh +++ b/buildroot-manage.sh @@ -997,6 +997,14 @@ is_running() { [ -f "$PIDFILE" ] && kill -0 "$(cat "$PIDFILE")" 2>/dev/null } +start_or_restart_service() { + if is_running; then + "$INIT_SCRIPT" restart + else + "$INIT_SCRIPT" start + fi +} + get_version() { if [ -x "$VENV_PYTHON" ]; then "$VENV_PYTHON" -c "from importlib.metadata import version; print(version('pymc_repeater'))" 2>/dev/null || echo "not installed" @@ -1146,7 +1154,7 @@ install_repeater() { create_init_script stage "Starting service" - "$INIT_SCRIPT" restart + start_or_restart_service ip_address=$(get_primary_ip) if is_running; then