blob: 5234626567e5ad5098a09a4082075bf319a47716 (
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
|
#!/bin/sh
#
# ex:ts=4:sw=4:noet
#-*- mode: makefile; tab-width: 4; -*-
SPAMDUSER=%%SPAMDUSER%%
SPAMDGROUP=%%SPAMDGROUP%%
check_db() {
DB=/var/db/spamd
if [ -f ${DB} ]; then
OWN=$(stat -f "%Su" ${DB})
GRP=$(stat -f "%Sg" ${DB})
if [ "x${OWN}" != "x${SPAMDUSER}" ]; then
echo "==> chown ${SPAMDUSER} ${DB} (previous ${OWN})"
chown ${SPAMDUSER} ${DB}
fi
if [ "x${GRP}" != "x${SPAMDGROUP}" ]; then
echo "==> chgrp ${SPAMDGROUP} ${DB} (previous ${GRP})"
chgrp ${SPAMDGROUP} ${DB}
fi
fi
}
if [ "$2" = "POST-INSTALL" ]; then
check_db
fi
|