mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-05 01:55:52 +00:00
c1b8f3d041
- 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)
27 lines
615 B
Bash
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
|