2001-08-14 23:42:14 +02:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2002-02-05 07:04:36 +01:00
|
|
|
# $NetBSD: courierpop.sh,v 1.5 2002/02/05 06:04:38 jlam Exp $
|
2002-01-02 23:19:37 +01:00
|
|
|
#
|
2001-08-14 23:42:14 +02:00
|
|
|
# Courier POP services daemon
|
|
|
|
#
|
|
|
|
# PROVIDE: courierpop
|
2002-01-22 23:08:48 +01:00
|
|
|
# REQUIRE: authdaemond
|
2001-08-14 23:42:14 +02:00
|
|
|
|
2002-02-05 07:04:36 +01:00
|
|
|
if [ -f /etc/rc.subr ]
|
2001-08-14 23:42:14 +02:00
|
|
|
then
|
|
|
|
. /etc/rc.subr
|
|
|
|
fi
|
|
|
|
|
|
|
|
name="courierpop"
|
|
|
|
rcvar=${name}
|
2002-01-02 23:19:37 +01:00
|
|
|
command="@PREFIX@/libexec/courier/couriertcpd"
|
|
|
|
ctl_command="@PREFIX@/libexec/courier/pop3d.rc"
|
2001-08-14 23:42:14 +02:00
|
|
|
pidfile="/var/run/pop3d.pid"
|
2002-01-02 23:19:37 +01:00
|
|
|
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
|
2001-08-14 23:42:14 +02:00
|
|
|
|
|
|
|
start_cmd="courier_doit start"
|
|
|
|
stop_cmd="courier_doit stop"
|
|
|
|
|
|
|
|
courier_doit()
|
|
|
|
{
|
|
|
|
action=$1
|
|
|
|
case ${action} in
|
2002-01-02 23:19:37 +01:00
|
|
|
start) echo "Starting ${name}." ;;
|
|
|
|
stop) echo "Stopping ${name}." ;;
|
2001-08-14 23:42:14 +02:00
|
|
|
esac
|
|
|
|
|
|
|
|
${ctl_command} ${action}
|
|
|
|
}
|
|
|
|
|
2002-02-05 07:04:36 +01:00
|
|
|
if [ -f /etc/rc.subr ]
|
2001-08-14 23:42:14 +02:00
|
|
|
then
|
2002-01-02 23:19:37 +01:00
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|
|
|
|
else
|
2001-08-14 23:42:14 +02:00
|
|
|
echo -n " ${name}"
|
2002-01-02 23:19:37 +01:00
|
|
|
${start_cmd}
|
2001-08-14 23:42:14 +02:00
|
|
|
fi
|