aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-05-13 16:51:55 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-05-13 16:51:55 -0500
commitddce529c71c2e9f01d8e5666e27050b6ed6c6761 (patch)
tree7ec5455bc0419392e44a35c586ab1c237e2ff423
parente372f97bebd4866633ad56aa5d5b1ae59fa88118 (diff)
More s6 fixes
- When no service link is in the scan directory, show the default stopped message. - Do not remove the service link when stopping the service.
-rw-r--r--sh/s6.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/sh/s6.sh b/sh/s6.sh
index 01527b6d..a99fd5b8 100644
--- a/sh/s6.sh
+++ b/sh/s6.sh
@@ -37,12 +37,16 @@ s6_stop()
fi
sleep 1.5
set -- $(s6-svstat "${s6_service_link}")
- [ "$1" = "down" ] && rm -fr "${s6_service_link}"
+ [ "$1" = "down" ]
eend $? "Failed to stop $RC_SVCNAME"
}
s6_status()
{
s6_service_link="${RC_SVCDIR}/s6-scan/${s6_service_path##*/}"
- s6-svstat "${s6_service_link}"
+ if [ -L "${s6_service_link}" ]; then
+ s6-svstat "${s6_service_link}"
+ else
+ _status
+ fi
}