aboutsummaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd24/files
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2003-08-30 14:17:22 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2003-08-30 14:17:22 +0000
commite1abfdbd5c2e892d8dc48d8fdbaaf22504380df6 (patch)
treeb13ff06e413bf060d49372dac718ba7fe9af4ac1 /mail/cyrus-imapd24/files
parent02b99699efae0be46e8bee954109b972ed74a35f (diff)
downloadports-e1abfdbd5c2e892d8dc48d8fdbaaf22504380df6.tar.gz
ports-e1abfdbd5c2e892d8dc48d8fdbaaf22504380df6.zip
Notes
Diffstat (limited to 'mail/cyrus-imapd24/files')
-rw-r--r--mail/cyrus-imapd24/files/imapd.sh51
1 files changed, 31 insertions, 20 deletions
diff --git a/mail/cyrus-imapd24/files/imapd.sh b/mail/cyrus-imapd24/files/imapd.sh
index d34317dd5501..c3e61b10917d 100644
--- a/mail/cyrus-imapd24/files/imapd.sh
+++ b/mail/cyrus-imapd24/files/imapd.sh
@@ -3,24 +3,35 @@
# Start or stop cyrus-imapd
# $FreeBSD$
-case "$1" in
-start)
- if [ -x /usr/local/cyrus/bin/master -a \
- -f /usr/local/etc/cyrus.conf -a \
- -f /usr/local/etc/imapd.conf ]; then
- /usr/local/cyrus/bin/master -d
- echo -n ' imapd'
- fi
- ;;
-stop)
- if [ -r /var/run/cyrus-master.pid ]; then
- kill `cat /var/run/cyrus-master.pid` && echo -n ' imapd'
- rm /var/run/cyrus-master.pid
- fi
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
+# PROVIDE: cyrus_imapd
+# REQUIRE: DAEMON
+# BEFORE: mail
+# KEYWORD: FreeBSD shutdown
+#
+# NOTE for FreeBSD 5.0+:
+# If you want this script to start with the base rc scripts
+# move imapd.sh to /etc/rc.d/cyrus_imapd
-exit 0
+prefix=%%PREFIX%%
+
+# Define these imapd_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/cyrus_imapd
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+cyrus_imapd_enable="YES" # Enable imapd
+#cyrus_imapd_program="${prefix}/cyrus/bin/master" # Location of imapd
+cyrus_imapd_flags="-d" # Flags to imapd program
+
+. %%RC_SUBR%%
+
+name="cyrus_imapd"
+rcvar=`set_rcvar`
+command="${prefix}/cyrus/bin/master"
+pidfile="/var/run/cyrus-master.pid"
+required_files="${prefix}/etc/cyrus.conf ${prefix}/etc/imapd.conf"
+
+load_rc_config $name
+run_rc_command "$1"