5471197f6a
- Now config files are not removed - add many knobs - Use USE_OPENSSL hook PR: 57160 Submitted by: Clement Laforet <sheepkiller@cultdeadsheep.org> (maintainer)
46 lines
987 B
Bash
46 lines
987 B
Bash
#!/bin/sh
|
|
|
|
PKGNAME=$1
|
|
[ ! -n PKG_PREFIX ] && exit 1
|
|
PKG_PREFIX=${PKG_PREFIX:-/usr/local}
|
|
|
|
case $2 in
|
|
PRE-INSTALL)
|
|
;;
|
|
CHECK-CONF)
|
|
NEWSBASE=${PKG_PREFIX}/news
|
|
echo "Checking for configuration files"
|
|
for f in $(find ${NEWSBASE}/etc/ -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
|
|
;;
|
|
POST-INSTALL)
|
|
NEWSBASE=${PKG_PREFIX}/news
|
|
install -d -o news -g news -m 755 \
|
|
${NEWSBASE}/run \
|
|
${NEWSBASE}/spool \
|
|
${NEWSBASE}/spool/archive \
|
|
${NEWSBASE}/spool/articles \
|
|
${NEWSBASE}/spool/incoming \
|
|
${NEWSBASE}/spool/incoming/bad \
|
|
${NEWSBASE}/spool/innfeed \
|
|
${NEWSBASE}/spool/outgoing \
|
|
${NEWSBASE}/spool/overview \
|
|
${NEWSBASE}/spool/tmp
|
|
;;
|
|
*)
|
|
echo "Unexpected Argument $2!!!"
|
|
exit 1
|
|
;;
|
|
esac
|
|
exit 0
|