freebsd-ports/mail/dovecot-devel/files/dovecot.sh.sample
Sergei Kolobov a2d84b3811 - Update to 0.99.10.4
- Improve pkg-install script (create /var/dovecot tree)
- Add pkg-deinstall to cleanup dovecot directories and remove
  created uids at de-install; ask to stop dovecot
  if it's still running
- Make pkg-message obey PREFIX/DOCSDIR
- Make use of USE_OPENLDAP, rename WITH_LDAP2 to more standard WITH_LDAP
- Remove 'Feature Autodetection'. If you want the port built with extra
  dependencies, tell it: avoid bloat
- Update the rc.d script to work with relative addressing
  (e.g. './dovecot.sh start' works.)
- Assign maintainership to the submitter

PR:		59762
Submitted by:	Robin Breathe <robin@isometry.net>
2003-12-08 16:08:14 +00:00

21 lines
383 B
Bash

#!/bin/sh
if ! PREFIX=$(expr $(realpath $(dirname $0)) : "\(.*\)/etc/rc\.d\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
case "$1" in
start)
[ -x ${PREFIX}/sbin/dovecot ] && \
${PREFIX}/sbin/dovecot && echo -n ' dovecot'
;;
stop)
/usr/bin/killall dovecot && echo -n ' dovecot'
;;
*)
echo "Usage: `basename $0` { start | stop }" >&2
;;
esac
exit 0