From: nico Date: Mon, 14 Nov 2011 02:38:47 +0000 (+0000) Subject: packages/haproxy: use new service functions X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=ac37eb26741b0bcd279e854f193c84aa2d98abdd;p=packages.git packages/haproxy: use new service functions git-svn-id: svn://svn.openwrt.org/openwrt/packages@29097 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index 205d6d305..e8d9a36e9 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010 OpenWrt.org +# Copyright (C) 2010-2011 OpenWrt.org # Copyright (C) 2009-2010 Thomas Heil # # This is free software, licensed under the GNU General Public License v2. @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haproxy PKG_VERSION:=1.4.18 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src diff --git a/net/haproxy/files/haproxy.init b/net/haproxy/files/haproxy.init index 73a21e783..1548e31de 100644 --- a/net/haproxy/files/haproxy.init +++ b/net/haproxy/files/haproxy.init @@ -4,28 +4,21 @@ START=99 STOP=80 +SERVICE_USE_PID=1 + HAPROXY_BIN="/usr/sbin/haproxy" HAPROXY_CONFIG="/etc/haproxy.cfg" HAPROXY_PID="/var/run/haproxy.pid" -boot() { - - #Do nothing on boot - exit 0 -} - start() { - [ -x "$HAPROXY_BIN" ] || return 1 - - start-stop-daemon -S -x $HAPROXY_BIN -- \ - -f "$HAPROXY_CONFIG" -V -D -p "$HAPROXY_PID" + service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID" } stop() { - service_kill ${HAPROXY_BIN##*/} $HAPROXY_PID - rm -f $HAPROXY_PID + $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -st $(cat $HAPROXY_PID) + service_stop $HAPROXY_BIN } reload() { - $HAPROXY_BIN -f $HAPROXY_CONFIG -D -V -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) + $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) }