diff options
author | ume <ume@FreeBSD.org> | 2003-08-30 14:17:22 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-08-30 14:17:22 +0000 |
commit | 0f4361bb3af7fed1bae314a01303b7c62da0e3e8 (patch) | |
tree | 2df1804e498b3523e473065a864d2cd21d2a5799 /mail/cyrus-imapd22 | |
parent | 0458f8bef0d095a79d66ca4c78e56175ea6848cf (diff) | |
download | FreeBSD-ports-0f4361bb3af7fed1bae314a01303b7c62da0e3e8.zip FreeBSD-ports-0f4361bb3af7fed1bae314a01303b7c62da0e3e8.tar.gz |
Use USE_RC_SUBR.
Diffstat (limited to 'mail/cyrus-imapd22')
-rw-r--r-- | mail/cyrus-imapd22/Makefile | 2 | ||||
-rw-r--r-- | mail/cyrus-imapd22/files/imapd.sh | 51 |
2 files changed, 33 insertions, 20 deletions
diff --git a/mail/cyrus-imapd22/Makefile b/mail/cyrus-imapd22/Makefile index 3e39df0..27a9b71 100644 --- a/mail/cyrus-imapd22/Makefile +++ b/mail/cyrus-imapd22/Makefile @@ -22,6 +22,8 @@ CONFLICTS= cyrus-1.* cyrus-imapd-2.[^2].* LIB_DEPENDS= sasl2.2:${PORTSDIR}/security/cyrus-sasl2 BUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend +USE_RC_SUBR= YES + USE_PERL5= yes USE_REINPLACE= YES GNU_CONFIGURE= YES diff --git a/mail/cyrus-imapd22/files/imapd.sh b/mail/cyrus-imapd22/files/imapd.sh index d34317d..c3e61b1 100644 --- a/mail/cyrus-imapd22/files/imapd.sh +++ b/mail/cyrus-imapd22/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" |