aboutsummaryrefslogtreecommitdiffstats
path: root/main/haproxy/haproxy.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-04 06:33:06 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-04 06:34:25 +0000
commit2836e773760085b85aaaa7e42fe470bcdcfd7dd6 (patch)
tree8944c5206294f231b0aad6390be182c316a09d6d /main/haproxy/haproxy.initd
parent36e118bda92e4c87a1505f8ebfe2ebaad4c59991 (diff)
downloadaports-2836e773760085b85aaaa7e42fe470bcdcfd7dd6.tar.bz2
aports-2836e773760085b85aaaa7e42fe470bcdcfd7dd6.tar.xz
main/haproxy: fix init.d script
fixes #1120 (cherry picked from commit 73ff75dc2cad984f4bb65267e6637ccb0aa3ae02)
Diffstat (limited to 'main/haproxy/haproxy.initd')
-rw-r--r--main/haproxy/haproxy.initd8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/haproxy/haproxy.initd b/main/haproxy/haproxy.initd
index f96931b182..7855afa043 100644
--- a/main/haproxy/haproxy.initd
+++ b/main/haproxy/haproxy.initd
@@ -5,6 +5,7 @@
extra_commands="checkconfig"
extra_started_commands="reload"
+command=/usr/sbin/haproxy
CONFFILE=/etc/${SVCNAME}.cfg
PIDFILE=/var/run/${SVCNAME}.pid
@@ -22,13 +23,13 @@ checkconfig() {
fi
ebegin "Checking ${CONFFILE}"
- /usr/bin/haproxy -q -c -f "${CONFFILE}"
+ $command -q -c -f "${CONFFILE}"
eend $?
}
start() {
ebegin "Starting ${SVCNAME}"
- start-stop-daemon --pidfile "${PIDFILE}" --exec /usr/bin/haproxy \
+ start-stop-daemon --pidfile "${PIDFILE}" --exec $command \
--start -- -D -p "${PIDFILE}" -f "${CONFFILE}"
eend $?
}
@@ -47,6 +48,7 @@ stop() {
reload() {
ebegin "Reloading ${SVCNAME}"
checkconfig || { eerror "Reloading failed, please fix your ${CONFFILE} first"; return 1; }
- /usr/bin/haproxy -D -p "${PIDFILE}" -f "${CONFFILE}" -sf $(cat "${PIDFILE}")
+ $command -D -p "${PIDFILE}" -f "${CONFFILE}" -sf $(cat "${PIDFILE}")
eend $?
}
+