pkgsrc/security/smtpd/files/smtpfwdd.sh
joerg 1073fb5d98 Kill the post-install script. The example files are installed under
${PREFIX}/share/examples/smtpd, the spool setup moved into a newly added
rc script. This also handles missing configurations files better, since
the old post-install would fail e.g. if no local time was configured.

Bump revision.
2005-10-29 19:49:40 +00:00

30 lines
501 B
Bash

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: smtpfwdd.sh,v 1.1 2005/10/29 19:49:40 joerg Exp $
#
# PROVIDE: smtpfwdd
# REQUIRE: DAEMON
. /etc/rc.subr
name=smtpfwdd
rcvar=$name
start_precmd=smtpd_precmd
command="@PREFIX@/sbin/smtpfwdd"
SPOOL="@SPOOL@"
smtpd_precmd()
{
(umask 077 && mkdir -p ${SPOOL}/etc)
for f in TIMEZONE localtime resolv.conf; do
if [ -f /etc/$f ]; then
cmp -s /etc/$f ${SPOOL}/etc/$f ||
cp -p /etc/$f ${SPOOL}/etc/$f
fi
done
}
load_rc_config $name
run_rc_command "$1"