#!/bin/bash # # /etc/rc.d/init.d/mailtunnel # # Starts the SSL tunnel for sendmail # # chkconfig: 2345 79 31 # description: SSL tunnel for sendmail # processname: stunnel # Source function library. . /etc/init.d/functions prog="mailtunnel" configfile=/etc/mail/mailtunnel.conf pidfile="/var/run/$prog.pid" test -x /usr/sbin/stunnel -a -f $configfile || exit 0 RETVAL=0 start() { echo -n $"Starting $prog: " params=$(egrep '^[[:space:]]*(accept|connect)[[:space:]]*=' $configfile) daemon --pidfile=$pidfile /usr/sbin/stunnel -fd 0 <