ports/mail/spamd/files/pkg-install.in
Olli Hauer 770d54723e - fix build against openssl 1.x
- do not add /etc/service entries during install
- add helper script to add /etc/services entries
- remove unused pkg-deinstall
- portlint

PR:		235496
Submitted by:	Maxime Soule
Reported by:	many
2020-03-30 21:10:08 +00:00

30 lines
576 B
Makefile

#!/bin/sh
#
# ex:ts=4:sw=4:noet
#-*- mode: makefile; tab-width: 4; -*-
#
# $FreeBSD$
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