From 4030110f0eb73c30cf79c028fd0fe52a485a8316 Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Sun, 5 Aug 2007 20:14:02 +0000 Subject: - Forgot the new RC script by last commit! PR: ports/112934 Approved by: pav (portmgr, in mentor's absence) --- net/haproxy-devel/files/haproxy.in | 50 +++++++++++++++++++++++++++++++++++ net/haproxy-devel/files/haproxy.sh.in | 50 ----------------------------------- 2 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 net/haproxy-devel/files/haproxy.in delete mode 100644 net/haproxy-devel/files/haproxy.sh.in (limited to 'net/haproxy-devel') diff --git a/net/haproxy-devel/files/haproxy.in b/net/haproxy-devel/files/haproxy.in new file mode 100644 index 000000000000..244bddfbd7e1 --- /dev/null +++ b/net/haproxy-devel/files/haproxy.in @@ -0,0 +1,50 @@ +#!/bin/sh +# +# $FreeBSD: +# + +# PROVIDE: haproxy +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable haproxy: +# haproxy_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable haproxy +# haproxylimits_enable (bool):Set to "NO" by default. +# Set it to yes to run `limits $limits_args` +# just before haproxy starts. +# haproxy_flags (str): Set to "" by default. +# Extra flags passed to start command +# haproxylimits_args (str): Default to "-e -C daemon" +# Arguments of pre-start limits run. +# +. %%RC_SUBR%% + +name="haproxy" +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/haproxy" +pidfile="/var/run/haproxy.pid" +required_files=%%PREFIX%%/etc/haproxy.conf + +[ -z "$haproxy_enable" ] && haproxy_enable="NO" +[ -z "$haproxy_flags" ] && haproxy_flags="-p ${pidfile} -f /usr/local/etc/haproxy.conf" +[ -z "$haproxylimits_enable" ] && haproxylimits_enable="NO" +[ -z "$haproxylimits_args" ] && haproxylimits_args="-e -C daemon" + +load_rc_config $name + +checkyesno haproxylimits_enable && \ + start_precmd="eval `/usr/bin/limits ${haproxylimits_args}` 2>/dev/null" + +sig_gracefulstop=SIGUSR1 + +haproxy_gracefulstop() { + echo "Gracefully shutdown haproxy ($rc_pid)" + kill -${sig_gracefulstop} ${rc_pid} + } + +extra_commands="gracefulstop" +run_rc_command "$1" diff --git a/net/haproxy-devel/files/haproxy.sh.in b/net/haproxy-devel/files/haproxy.sh.in deleted file mode 100644 index 9083c615dd65..000000000000 --- a/net/haproxy-devel/files/haproxy.sh.in +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net/haproxy-devel/files/Attic/haproxy.sh.in,v 1.1 2006-11-01 14:42:14 clement Exp $ -# - -# PROVIDE: haproxy -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable haproxy: -# haproxy_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable haproxy -# haproxylimits_enable (bool):Set to "NO" by default. -# Set it to yes to run `limits $limits_args` -# just before haproxy starts. -# haproxy_flags (str): Set to "" by default. -# Extra flags passed to start command -# haproxylimits_args (str): Default to "-e -C daemon" -# Arguments of pre-start limits run. -# -. %%RC_SUBR%% - -name="haproxy" -rcvar=`set_rcvar` - -command="%%PREFIX%%/sbin/haproxy" -pidfile="/var/run/haproxy.pid" -required_files=%%PREFIX%%/etc/haproxy.conf - -[ -z "$haproxy_enable" ] && haproxy_enable="NO" -[ -z "$haproxy_flags" ] && haproxy_flags="-p ${pidfile} -f /usr/local/etc/haproxy.conf" -[ -z "$haproxylimits_enable" ] && haproxylimits_enable="NO" -[ -z "$haproxylimits_args" ] && haproxylimits_args="-e -C daemon" - -load_rc_config $name - -checkyesno haproxylimits_enable && \ - start_precmd="eval `/usr/bin/limits ${haproxylimits_args}` 2>/dev/null" - -sig_gracefulstop=SIGUSR1 - -haproxy_gracefulstop() { - echo "Gracefully shutdown haproxy ($rc_pid)" - kill -${sig_gracefulstop} ${rc_pid} - } - -extra_commands="gracefulstop" -run_rc_command "$1" -- cgit v1.2.3