mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2025-01-30 22:34:27 +00:00
replace runit with sv
This commit is contained in:
parent
73897f6631
commit
80c3c056ba
|
@ -37,7 +37,7 @@ view_all_services() {
|
||||||
rc-service)
|
rc-service)
|
||||||
"$ESCALATION_TOOL" rc-update show | more
|
"$ESCALATION_TOOL" rc-update show | more
|
||||||
;;
|
;;
|
||||||
runit)
|
sv)
|
||||||
ls -1 /etc/sv/ | more
|
ls -1 /etc/sv/ | more
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -53,7 +53,7 @@ view_enabled_services() {
|
||||||
rc-service)
|
rc-service)
|
||||||
"$ESCALATION_TOOL" rc-update show -v | grep "\[" | more
|
"$ESCALATION_TOOL" rc-update show -v | grep "\[" | more
|
||||||
;;
|
;;
|
||||||
runit)
|
sv)
|
||||||
ls -1 /var/service/ | more
|
ls -1 /var/service/ | more
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -69,7 +69,7 @@ view_disabled_services() {
|
||||||
rc-service)
|
rc-service)
|
||||||
"$ESCALATION_TOOL" rc-update show -v | grep -v "\[" | more
|
"$ESCALATION_TOOL" rc-update show -v | grep -v "\[" | more
|
||||||
;;
|
;;
|
||||||
runit)
|
sv)
|
||||||
ls -1 /etc/sv/ | grep -v "$(ls -1 /var/service/)" | more
|
ls -1 /etc/sv/ | grep -v "$(ls -1 /var/service/)" | more
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -85,7 +85,7 @@ view_started_services() {
|
||||||
rc-service)
|
rc-service)
|
||||||
"$ESCALATION_TOOL" rc-status --servicelist | more
|
"$ESCALATION_TOOL" rc-status --servicelist | more
|
||||||
;;
|
;;
|
||||||
runit)
|
sv)
|
||||||
for service in /var/service/*; do
|
for service in /var/service/*; do
|
||||||
[ -d "$service" ] && "$ESCALATION_TOOL" sv status "$(basename "$service")" | grep "^run:" >/dev/null && basename "$service"
|
[ -d "$service" ] && "$ESCALATION_TOOL" sv status "$(basename "$service")" | grep "^run:" >/dev/null && basename "$service"
|
||||||
done | more
|
done | more
|
||||||
|
@ -185,7 +185,7 @@ remove_service() {
|
||||||
printf "%b\n" "Service $SERVICE_NAME does not exist."
|
printf "%b\n" "Service $SERVICE_NAME does not exist."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
runit)
|
sv)
|
||||||
SERVICE_DIR="/etc/sv/$SERVICE_NAME"
|
SERVICE_DIR="/etc/sv/$SERVICE_NAME"
|
||||||
if [ -d "$SERVICE_DIR" ]; then
|
if [ -d "$SERVICE_DIR" ]; then
|
||||||
"$ESCALATION_TOOL" rm -rf "$SERVICE_DIR"
|
"$ESCALATION_TOOL" rm -rf "$SERVICE_DIR"
|
||||||
|
@ -335,4 +335,4 @@ main() {
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
checkEscalationTool
|
checkEscalationTool
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in New Issue
Block a user