diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2016-09-13 12:27:08 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2016-09-13 12:52:10 -0500 |
commit | 8a8032478a755f6e2ceaebc5425e61c6817df936 (patch) | |
tree | 9446bd9c58ebc819e118d971a3d2919fa3d06fc7 /sh | |
parent | ac53c9a658589456c678b6bfe674a66a3845e564 (diff) |
Make use of name vs RC_SVCNAME consistent in supervisor scripts
This fixes #79.
Diffstat (limited to 'sh')
-rw-r--r-- | sh/runit.sh | 4 | ||||
-rw-r--r-- | sh/s6.sh | 4 | ||||
-rw-r--r-- | sh/start-stop-daemon.sh | 4 | ||||
-rw-r--r-- | sh/supervise-daemon.sh | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sh/runit.sh b/sh/runit.sh index e9c1d220..3cef0f3a 100644 --- a/sh/runit.sh +++ b/sh/runit.sh @@ -21,7 +21,7 @@ runit_start() ebegin "Starting ${name:-$RC_SVCNAME}" ln -snf "${service_path}" "${service_link}" sv start "${service_link}" > /dev/null 2>&1 - eend $? "Failed to start $RC_SVCNAME" + eend $? "Failed to start ${name:-$RC_SVCNAME}" } runit_stop() @@ -36,7 +36,7 @@ runit_stop() ebegin "Stopping ${name:-$RC_SVCNAME}" sv stop "${service_link}" > /dev/null 2>&1 && rm "${service_link}" - eend $? "Failed to stop $RC_SVCNAME" + eend $? "Failed to stop ${name:-$RC_SVCNAME}" } runit_status() @@ -30,7 +30,7 @@ s6_start() sleep 1.5 set -- $(s6-svstat "${s6_service_link}") [ "$1" = "up" ] - eend $? "Failed to start $RC_SVCNAME" + eend $? "Failed to start ${name:-$RC_SVCNAME}" } s6_stop() @@ -44,7 +44,7 @@ s6_stop() s6-svc -wD -d -T ${s6_service_timeout_stop:-10000} "${s6_service_link}" set -- $(s6-svstat "${s6_service_link}") [ "$1" = "down" ] - eend $? "Failed to stop $RC_SVCNAME" + eend $? "Failed to stop ${name:-$RC_SVCNAME}" } s6_status() diff --git a/sh/start-stop-daemon.sh b/sh/start-stop-daemon.sh index 65ee6603..6b679ac2 100644 --- a/sh/start-stop-daemon.sh +++ b/sh/start-stop-daemon.sh @@ -46,7 +46,7 @@ ssd_start() ${command_user+--user} $command_user \ $_background $start_stop_daemon_args \ -- $command_args $command_args_background - if eend $? "Failed to start $RC_SVCNAME"; then + if eend $? "Failed to start ${name:-$RC_SVCNAME}"; then service_set_value "command" "${command}" [ -n "${chroot}" ] && service_set_value "chroot" "${chroot}" [ -n "${pidfile}" ] && service_set_value "pidfile" "${pidfile}" @@ -80,7 +80,7 @@ ssd_stop() ${pidfile:+--pidfile} $chroot$pidfile \ ${stopsig:+--signal} $stopsig - eend $? "Failed to stop $RC_SVCNAME" + eend $? "Failed to stop ${name:-$RC_SVCNAME}" } ssd_status() diff --git a/sh/supervise-daemon.sh b/sh/supervise-daemon.sh index 2d889a63..e6ac1174 100644 --- a/sh/supervise-daemon.sh +++ b/sh/supervise-daemon.sh @@ -31,7 +31,7 @@ supervise_start() [ -n "${chroot}" ] && service_set_value "chroot" "${chroot}" [ -n "${pidfile}" ] && service_set_value "pidfile" "${pidfile}" fi - eend $rc "failed to start $RC_SVCNAME" + eend $rc "failed to start ${name:-$RC_SVCNAME}" } supervise_stop() @@ -46,7 +46,7 @@ supervise_stop() ${pidfile:+--pidfile} $chroot$pidfile \ ${stopsig:+--signal} $stopsig - eend $? "Failed to stop $RC_SVCNAME" + eend $? "Failed to stop ${name:-$RC_SVCNAME}" } supervise_status() |