5 # description: POP3 SSL Daemon
7 sysconfdir=@sysconfdir@
8 libexecdir=@libexecdir@
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 . /etc/sysconfig/network
17 # Check that networking is up.
18 if is_yes "${NETWORKING}"; then
19 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
20 msg_network_down pop3d-ssl
28 # See how we were called.
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/courier-pop3-ssl ]; then
33 if [ -x "$COURIERTLS" -a ! -f "$TLS_CERTFILE" ]; then
34 msg_starting "pop3d-ssl cert generation"
35 daemon $sbindir/mkpop3dcert
37 . $sysconfdir/pop3d-ssl
38 msg_starting pop3d-ssl
39 daemon $libexecdir/pop3d-ssl.rc start
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-pop3-ssl
43 msg_already_running pop3d-ssl
47 if [ -f /var/lock/subsys/courier-pop3-ssl ]; then
48 . $sysconfdir/pop3d-ssl
49 msg_stopping pop3d-ssl
50 daemon $libexecdir/pop3d-ssl.rc stop
52 rm -f /var/lock/subsys/courier-pop3-ssl >/dev/null 2>&1
54 msg_not_running pop3d-ssl
67 msg_usage "$0 {start|stop|restart|force-reload|status}"