1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/news/cleanfeed/pkg-install
Johan van Selst c1b8f3d041 - Update to recent cleanfeed release by Steve Crook (2. June)
- Claim maintainership
- Now installs a .sample config files and doesn't override
  the original (cleanfeed.local) if it has been edited
- Internal files moved into a separate directory (upstream default)
2010-06-03 22:18:19 +00:00

27 lines
615 B
Bash

#!/bin/sh
PKGNAME=$1
[ ! -n "${PKG_PREFIX}" ] && exit 1
CONFFILE="${PKG_PREFIX}/news/cleanfeed/etc/cleanfeed.local"
case $2 in
POST-INSTALL)
cd ${PKG_PREFIX}/news/bin/filter \
&& mv filter_innd.pl filter_innd.pl.orig \
&& ln -s cleanfeed filter_innd.pl
mkdir -p /var/log/cleanfeed
chown news:news /var/log/cleanfeed
test -f ${CONFFILE} || cp -p ${CONFFILE}.sample ${CONFFILE}
;;
DEINSTALL)
cmp -s ${CONFFILE}.sample ${CONFFILE} && rm -f ${CONFFILE}
;;
POST-DEINSTALL)
cd ${PKG_PREFIX}/news/bin/filter \
&& mv filter_innd.pl.orig filter_innd.pl
rmdir /var/log/cleanfeed
;;
esac
exit 0