summaryrefslogtreecommitdiffstats
path: root/mail/milter-regex/pkg-install
blob: a5f814c7edbc690fa6124a5c4ecdc230492be329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/sh
# $OpenBSD$
#
# Pre/post-installation setup of milter-regex

set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}

do_notice()
{
  echo
  echo "+---------------"
  echo "| milter-regex has been installed as $PREFIX/libexec/milter-regex."
  echo "| See milter-regex(8) for instructions on how to register the plugin."
  echo "|"
  echo "| To start the plugin automatically on startup, one can use:"
  echo "|"
  echo "| /etc/rc.conf.local"
  echo "| milter_regex=YES"
  echo "|"
  echo "| /etc/rc.local"
  echo "| if [ X\"\${milter_regex}\" == X\"YES\" -a \\"
  echo "|      -x $PREFIX/libexec/milter-regex ]; then"
  echo "|         echo -n ' milter-regex'"
  echo "|         $PREFIX/libexec/milter-regex"
  echo "| fi"
  echo "|"
  echo "+---------------"
  echo
}

if [ $# -ne 2 ]; then
    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
    exit 1
fi

case $2 in
    PRE-INSTALL)
	;;
    POST-INSTALL)
	do_notice
	;;
    *)
	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
	exit 1
	;;
esac

exit 0
OpenPOWER on IntegriCloud