X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fstunnel4%2Ffiles%2Fetc-init.d-stunnel4;h=6456bfb7dca4ec523cbb748f204460319dcab107;hb=c84cfe794ac75a4180dc551cf57c876e257a907c;hp=fc17c6df62134e3372a9d0dc9e8da0f6fe1d538a;hpb=05e80008e232b3319f2db0922126b49b230d21a3;p=mirror%2Fdsa-puppet.git diff --git a/modules/stunnel4/files/etc-init.d-stunnel4 b/modules/stunnel4/files/etc-init.d-stunnel4 index fc17c6df6..6456bfb7d 100755 --- a/modules/stunnel4/files/etc-init.d-stunnel4 +++ b/modules/stunnel4/files/etc-init.d-stunnel4 @@ -20,10 +20,22 @@ DEFAULTPIDFILE="/var/run/stunnel4.pid" DAEMON=/usr/bin/stunnel4 NAME=stunnel DESC="SSL tunnels" -FILES="${STUNNEL_FILES:-/etc/stunnel/*.conf}" OPTIONS="" ENABLED=0 +ulimit -n 4096 + +if [ -n "${2:-}" ]; then + if [ -e "/etc/stunnel/$2.conf" ]; then + FILES="/etc/stunnel/$2.conf" + else + echo >&2 "/etc/stunnel/$2.conf does not exist." + exit 1 + fi +else + FILES="/etc/stunnel/*.conf" +fi + get_pids() { local file=$1 if test -f $file; then @@ -107,7 +119,7 @@ case "$1" in ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|force-reload|restart}" >&2 + echo "Usage: $N {start|stop|force-reload|restart} []" >&2 exit 1 ;; esac