From dc61abd3bbeeb67a13c89c959bdb054450241278 Mon Sep 17 00:00:00 2001 From: Jaredy899 <76603258+Jaredy899@users.noreply.github.com> Date: Tue, 24 Dec 2024 07:51:53 -0500 Subject: [PATCH 1/4] Update common-service-script.sh --- core/tabs/common-service-script.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/core/tabs/common-service-script.sh b/core/tabs/common-service-script.sh index c3a2053d..4bb969e0 100644 --- a/core/tabs/common-service-script.sh +++ b/core/tabs/common-service-script.sh @@ -23,6 +23,9 @@ startService() { rc-service) "$ESCALATION_TOOL" "$INIT_MANAGER" "$1" start ;; + runit) + "$ESCALATION_TOOL" sv start "$1" + ;; esac } @@ -34,6 +37,9 @@ stopService() { rc-service) "$ESCALATION_TOOL" "$INIT_MANAGER" "$1" stop ;; + runit) + "$ESCALATION_TOOL" sv stop "$1" + ;; esac } @@ -45,6 +51,11 @@ enableService() { rc-service) "$ESCALATION_TOOL" rc-update add "$1" ;; + runit) + "$ESCALATION_TOOL" mkdir -p "/run/runit/supervise.$1" + "$ESCALATION_TOOL" ln -sf "/etc/sv/$1" "/var/service/" + sleep 2 + ;; esac } @@ -56,6 +67,9 @@ disableService() { rc-service) "$ESCALATION_TOOL" rc-update del "$1" ;; + runit) + "$ESCALATION_TOOL" rm -f "/var/service/$1" + ;; esac } @@ -68,6 +82,10 @@ startAndEnableService() { enableService "$1" startService "$1" ;; + runit) + enableService "$1" + startService "$1" + ;; esac } @@ -79,7 +97,10 @@ isServiceActive() { rc-service) "$ESCALATION_TOOL" "$INIT_MANAGER" "$1" status --quiet ;; + runit) + "$ESCALATION_TOOL" sv status "$1" >/dev/null 2>&1 + ;; esac } -checkInitManager 'systemctl rc-service' \ No newline at end of file +checkInitManager 'systemctl rc-service runit' From 83fee492b8834b866a1797fbc09efaef9ad3f836 Mon Sep 17 00:00:00 2001 From: Jaredy899 <76603258+Jaredy899@users.noreply.github.com> Date: Thu, 26 Dec 2024 22:21:31 -0500 Subject: [PATCH 2/4] Update common-service-script.sh --- core/tabs/common-service-script.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/tabs/common-service-script.sh b/core/tabs/common-service-script.sh index 4bb969e0..5409b1fa 100644 --- a/core/tabs/common-service-script.sh +++ b/core/tabs/common-service-script.sh @@ -78,11 +78,7 @@ startAndEnableService() { systemctl) "$ESCALATION_TOOL" "$INIT_MANAGER" enable --now "$1" ;; - rc-service) - enableService "$1" - startService "$1" - ;; - runit) + rc-service|runit) enableService "$1" startService "$1" ;; From d44ce3cdb605dc541bc13de73ac1665323de3d2a Mon Sep 17 00:00:00 2001 From: Jaredy899 <76603258+Jaredy899@users.noreply.github.com> Date: Fri, 10 Jan 2025 00:33:45 -0500 Subject: [PATCH 3/4] sleep for 5 to allow supervise to run --- core/tabs/common-service-script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/common-service-script.sh b/core/tabs/common-service-script.sh index 5409b1fa..52967bca 100644 --- a/core/tabs/common-service-script.sh +++ b/core/tabs/common-service-script.sh @@ -54,7 +54,7 @@ enableService() { runit) "$ESCALATION_TOOL" mkdir -p "/run/runit/supervise.$1" "$ESCALATION_TOOL" ln -sf "/etc/sv/$1" "/var/service/" - sleep 2 + sleep 5 ;; esac } From 5746748f520be71a3321aac0d8faa1a08425b24a Mon Sep 17 00:00:00 2001 From: Jaredy899 <76603258+Jaredy899@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:32:51 -0500 Subject: [PATCH 4/4] Update common-service-script.sh --- core/tabs/common-service-script.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/core/tabs/common-service-script.sh b/core/tabs/common-service-script.sh index 52967bca..5828aa64 100644 --- a/core/tabs/common-service-script.sh +++ b/core/tabs/common-service-script.sh @@ -52,7 +52,6 @@ enableService() { "$ESCALATION_TOOL" rc-update add "$1" ;; runit) - "$ESCALATION_TOOL" mkdir -p "/run/runit/supervise.$1" "$ESCALATION_TOOL" ln -sf "/etc/sv/$1" "/var/service/" sleep 5 ;;