DAEMON=/usr/bin/stunnel4
NAME=stunnel
DESC="SSL tunnels"
-FILES="${STUNNEL_FILES:-/etc/stunnel/*.conf}"
OPTIONS=""
ENABLED=0
+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
;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|force-reload|restart}" >&2
+ echo "Usage: $N {start|stop|force-reload|restart} [<stunnel instance>]" >&2
exit 1
;;
esac