opt/stunnel/stunnel
2006-02-25 15:42:56 +00:00

30 lines
385 B
Bash

#!/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