2004-12-19 00:45:06 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
PKGNAME=$1
|
|
|
|
[ ! -n "${PKG_PREFIX}" ] && exit 1
|
|
|
|
|
2010-06-03 22:18:19 +00:00
|
|
|
CONFFILE="${PKG_PREFIX}/news/cleanfeed/etc/cleanfeed.local"
|
|
|
|
|
2004-12-19 00:45:06 +00:00
|
|
|
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
|
2010-06-03 22:18:19 +00:00
|
|
|
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}
|
2004-12-19 00:45:06 +00:00
|
|
|
;;
|
|
|
|
POST-DEINSTALL)
|
|
|
|
cd ${PKG_PREFIX}/news/bin/filter \
|
|
|
|
&& mv filter_innd.pl.orig filter_innd.pl
|
2010-06-03 22:18:19 +00:00
|
|
|
rmdir /var/log/cleanfeed
|
2004-12-19 00:45:06 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
exit 0
|