#!/bin/sh # # /etc/rc.d/stunnel: start/stop stunnel daemon # CRT=/etc/ssl/certs/stunnel.crt KEY=/etc/ssl/keys/stunnel.key case $1 in start) if [ ! -s $KEY -o ! -s $CRT ]; then /usr/bin/mksslcert $KEY $CRT fi /usr/sbin/stunnel ;; stop) killall -q /usr/sbin/stunnel ;; restart) $0 stop sleep 2 $0 start ;; *) echo "usage: $0 [start|stop|restart]" ;; esac # End of file