aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-11-15 14:15:06 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-11-15 14:15:15 -0600
commit0f704402a236d385e8b30083ccf9aca327c0a57e (patch)
treecab8560446f56497eb22946ce006b5a072ba8d5e /sh
parent2504a2c25bc0587b36d81a2d85c203b20e2d40cf (diff)
supervise-daemon: make the pidfile an implementation detail
The pidfile of the supervisor doesn't need to be adjustable by the service script. It is only used so the supervisor can stop itself when the --stop option is used.
Diffstat (limited to 'sh')
-rw-r--r--sh/supervise-daemon.sh6
1 files changed, 0 insertions, 6 deletions
diff --git a/sh/supervise-daemon.sh b/sh/supervise-daemon.sh
index 5d803d7c..d12c54eb 100644
--- a/sh/supervise-daemon.sh
+++ b/sh/supervise-daemon.sh
@@ -30,7 +30,6 @@ supervise_start()
${chroot:+--chroot} $chroot \
${output_log+--stdout} ${output_log} \
${error_log+--stderr} $error_log \
- ${pidfile:+--pidfile} $pidfile \
${respawn_delay:+--respawn-delay} $respawn_delay \
${respawn_max:+--respawn-max} $respawn_max \
${respawn_period:+--respawn-period} $respawn_period \
@@ -44,7 +43,6 @@ supervise_start()
rc=$?
if [ $rc = 0 ]; then
[ -n "${chroot}" ] && service_set_value "chroot" "${chroot}"
- [ -n "${pidfile}" ] && service_set_value "pidfile" "${pidfile}"
fi
eend $rc "failed to start ${name:-$RC_SVCNAME}"
}
@@ -52,13 +50,9 @@ supervise_start()
supervise_stop()
{
local startchroot="$(service_get_value "chroot")"
- local startpidfile="$(service_get_value "pidfile")"
chroot="${startchroot:-$chroot}"
- pidfile="${startpidfile:-$pidfile}"
- [ -n "$pidfile" ] || return 0
ebegin "Stopping ${name:-$RC_SVCNAME}"
supervise-daemon "${RC_SVCNAME}" --stop \
- ${pidfile:+--pidfile} $chroot$pidfile \
eend $? "Failed to stop ${name:-$RC_SVCNAME}"
}