Changeset 29097


Ignore:
Timestamp:
2011-11-14T03:38:47+01:00 (6 years ago)
Author:
nico
Message:

packages/haproxy: use new service functions

Location:
packages/net/haproxy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/haproxy/Makefile

    r28960 r29097  
    11# 
    2 # Copyright (C) 2010 OpenWrt.org 
     2# Copyright (C) 2010-2011 OpenWrt.org 
    33# Copyright (C) 2009-2010 Thomas Heil <heil@terminal-consulting.de>  
    44# 
     
    1111PKG_NAME:=haproxy 
    1212PKG_VERSION:=1.4.18 
    13 PKG_RELEASE:=1 
     13PKG_RELEASE:=2 
    1414 
    1515PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/net/haproxy/files/haproxy.init

    r23275 r29097  
    55STOP=80 
    66 
     7SERVICE_USE_PID=1 
     8 
    79HAPROXY_BIN="/usr/sbin/haproxy" 
    810HAPROXY_CONFIG="/etc/haproxy.cfg" 
    911HAPROXY_PID="/var/run/haproxy.pid" 
    1012 
    11 boot() { 
    12  
    13         #Do nothing on boot 
    14         exit 0 
    15 } 
    16  
    1713start() { 
    18         [ -x "$HAPROXY_BIN" ] || return 1 
    19  
    20         start-stop-daemon -S -x $HAPROXY_BIN -- \ 
    21                 -f "$HAPROXY_CONFIG" -V -D -p "$HAPROXY_PID" 
     14        service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID" 
    2215} 
    2316 
    2417stop() { 
    25         service_kill ${HAPROXY_BIN##*/} $HAPROXY_PID 
    26         rm -f $HAPROXY_PID 
     18        $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -st $(cat $HAPROXY_PID) 
     19        service_stop $HAPROXY_BIN 
    2720} 
    2821 
    2922reload() { 
    30         $HAPROXY_BIN -f $HAPROXY_CONFIG -D -V -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) 
     23        $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) 
    3124} 
Note: See TracChangeset for help on using the changeset viewer.