freebsd-ports/news/inn-current/pkg-install

47 lines
966 B
Text
Raw Normal View History

2000-09-24 14:44:26 +02:00
#!/bin/sh
PKGNAME=$1
[ ! -n PKG_PREFIX ] && exit 1
PKG_PREFIX=${PKG_PREFIX:-/usr/local}
2000-09-24 14:44:26 +02:00
case $2 in
PRE-INSTALL)
;;
CHECK-CONF)
ETC_DIR=${3}
echo "Checking for configuration files"
for f in $(find ${ETC_DIR} -name "*.dist" -type f)
do
REALFILE=${f%%.dist}
echo -n "Checking if ${REALFILE} exists: "
if [ -e ${REALFILE} ]
then
echo "[YES]"
else
echo "[NO]"
echo " Installing ${f} to ${REALFILE}"
cp ${f} ${REALFILE}
fi
done
;;
2000-09-24 14:44:26 +02:00
POST-INSTALL)
NEWSBASE=${PKG_PREFIX}/news
2000-09-24 14:44:26 +02:00
install -d -o news -g news -m 755 \
${NEWSBASE}/run \
${NEWSBASE}/spool \
${NEWSBASE}/spool/archive \
${NEWSBASE}/spool/articles \
${NEWSBASE}/spool/incoming \
2001-03-05 16:00:32 +01:00
${NEWSBASE}/spool/incoming/bad \
2000-09-24 14:44:26 +02:00
${NEWSBASE}/spool/innfeed \
${NEWSBASE}/spool/outgoing \
${NEWSBASE}/spool/overview \
${NEWSBASE}/spool/tmp
;;
*)
echo "Unexpected Argument $2!!!"
exit 1
;;
esac
exit 0