source: packages/net/haproxy/files/haproxy.init @ 29097

Last change on this file since 29097 was 29097, checked in by nico, 5 years ago

packages/haproxy: use new service functions

File size: 493 bytes
Line 
1#!/bin/sh /etc/rc.common
2# Copyright (C) 2009-2010 OpenWrt.org
3
4START=99
5STOP=80
6
7SERVICE_USE_PID=1
8
9HAPROXY_BIN="/usr/sbin/haproxy"
10HAPROXY_CONFIG="/etc/haproxy.cfg"
11HAPROXY_PID="/var/run/haproxy.pid"
12
13start() {
14        service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID"
15}
16
17stop() {
18        $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -st $(cat $HAPROXY_PID)
19        service_stop $HAPROXY_BIN
20}
21
22reload() {
23        $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
24}
Note: See TracBrowser for help on using the repository browser.