diff options
author | Badchay <badchay@protonmail.com> | 2022-04-16 04:49:08 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-16 12:12:45 +0700 |
commit | 61d912f9e6de95044e7602f44591c409d0efd377 (patch) | |
tree | 270e7bf1c718aea80055ddafaf5e9c527c84d234 /network/haproxy/rc.haproxy | |
parent | 3ba51ec5d0f1d7e6397b933482b8875b1874cc8e (diff) |
network/haproxy: Updated for version 2.5.5.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/haproxy/rc.haproxy')
-rw-r--r-- | network/haproxy/rc.haproxy | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/network/haproxy/rc.haproxy b/network/haproxy/rc.haproxy index a95a407133..e19ddf8ca5 100644 --- a/network/haproxy/rc.haproxy +++ b/network/haproxy/rc.haproxy @@ -1,15 +1,30 @@ -#!/bin/sh +#!/bin/bash +# +# Slackware initialization script for HAProxy. +# +# This script was made by T3slider. +# Slight modifications by Badchay. +# + HAPROXY=/usr/sbin/haproxy CONFIG=/etc/haproxy/haproxy.cfg PIDFILE=/var/run/haproxy.pid +if [[ ! -f $CONFIG && "$1" == "start" ]]; then + echo "No configuration file found. Cannot continue." + echo "The script looks for the configuration file placed in $CONFIG" + exit 1 +fi + start() { if [ -r $PIDFILE ]; then echo 'HAProxy is already running!' return + else + echo "Starting HAProxy..." + $HAPROXY -f $CONFIG -D -p $PIDFILE fi - $HAPROXY -f $CONFIG -D -p $PIDFILE } stop() { |