Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178117410
D62070.1796016873.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D62070.1796016873.diff
View Options
diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile
--- a/net/haproxy/Makefile
+++ b/net/haproxy/Makefile
@@ -1,6 +1,6 @@
PORTNAME= haproxy
DISTVERSION= 3.4.8
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net www
MASTER_SITES= http://www.haproxy.org/download/3.4/src/
diff --git a/net/haproxy/files/haproxy.in b/net/haproxy/files/haproxy.in
--- a/net/haproxy/files/haproxy.in
+++ b/net/haproxy/files/haproxy.in
@@ -79,13 +79,11 @@
eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}"
eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}"
else
- if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then
+ if [ -n "${haproxy_profiles}" ] && [ -n "$1" ]; then
for profile in ${haproxy_profiles}; do
echo "===> ${name} profile: ${profile}"
- %%PREFIX%%/etc/rc.d/haproxy $1 ${profile}
- retcode="$?"
- if [ ${retcode} -ne 0 ]; then
- failed="${profile} (${retcode}) ${failed:-}"
+ if ! %%PREFIX%%/etc/rc.d/haproxy $1 ${profile}; then
+ failed="${profile} ($?) ${failed:-}"
else
success="${profile} ${success:-}"
fi
@@ -103,12 +101,10 @@
haproxy_reload()
{
- ${command} -q -c -f ${haproxy_config}
- if [ $? -ne 0 ]; then
+ if ! ${command} -q -c -f ${haproxy_config}; then
err 1 "Error found in ${haproxy_config} - not reloading current process!"
fi
- rc_pid=$(check_pidfile ${pidfile} ${command})
- if [ $rc_pid ]; then
+ if check_pidfile ${pidfile} ${command}; then
${command} ${haproxy_flags} $reload_opt $(cat ${pidfile})
else
_run_rc_notrunning
@@ -118,8 +114,7 @@
haproxy_stop()
{
- rc_pid=$(check_pidfile ${pidfile} ${command})
- if [ $rc_pid ]; then
+ if rc_pid=$(check_pidfile ${pidfile} ${command}); then
rc_pid=$(cat ${pidfile})
kill -$sig_stop $rc_pid
wait_for_pids $rc_pid
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 30, 5:34 AM (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42101184
Default Alt Text
D62070.1796016873.diff (1 KB)
Attached To
Mode
D62070: net/haproxy: Modernize the rc script
Attached
Detach File
Event Timeline