blob: eac627867c16c695ea466a0062c7ccadfe2cccd6 (
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
|
# arg 1: the new package version
post_install() {
cat << EOM
--> if you are using LDAP services to provide lookup in sqwebmail or aliases
--> then you have to install:
libldap
EOM
# create the *.dat files
makealiases
makesmtpaccess
}
pre_upgrade() {
pre_remove $1
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install $1
}
pre_remove() {
# manual backup, since courier is always processing the whole directory
# - so it would process "system" AND "system.pacsave" -> bad
[ ! -d /etc/courier/_backup ] && mkdir /etc/courier/_backup
cp /etc/courier/aliases/system /etc/courier/_backup/aliases.system
cp /etc/courier/smtpaccess/default /etc/courier/_backup/smtpaccess.default
cat << EOM
--> the /etc/courier/aliase/system and the /etc/courier/smtpaccess/default
--> files have been backed up to /etc/courier/_backup since the *.pacsave
--> files cannot stay in place. Read about couriers alias handling from the
--> documentation!
EOM
}
# arg 1: the old package version
post_remove() {
/bin/true
}
op=$1
shift
$op $*
|