freebsd-ports/net/ntpa/pkg-deinstall
Kurt Jaeger f2758c13ed net/ntpa: update 0.7.6 -> 0.7.10
- Lookup on known time servers
- Log management with newsyslog
- Fixed bug in configuration reload
- Fixed bug in URIs with mono 2.6
- Fixed bug in database schema
- Trim dist package

PR:		215352
Submitted by:	Carsten Larsen <cs@innolan.dk> (maintainer)
2016-12-18 17:09:44 +00:00

32 lines
796 B
Bash

#! /bin/sh
delnewsyslog() {
tmp="/etc/#ntpa$$"
sed -e '/^\/var\/log\/ntpa\/ntpa.log /d' /etc/newsyslog.conf >${tmp}
cat ${tmp} > /etc/newsyslog.conf
rm ${tmp}
}
newsyslog() {
ENTRY=`grep /var/log/ntpa/ntpa.log /etc/newsyslog.conf`
DEFAULT='/var/log/ntpa/ntpa.log root:ntpa 660 10 * @T00 C /var/run/ntpa/ntpa.pid SIGUSR2'
if [ -z "$ENTRY" ]; then
exit 0
elif [ "$ENTRY" = "$DEFAULT" ]; then
delnewsyslog
else
echo "You have changed the default ntpa entry in \"/etc/newsyslog.conf\"".
echo "If you deinstall ntpa permanently, you have to manually remove it"
fi
}
case $2 in
DEINSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
newsyslog
fi
;;
POST-DEINSTALL)
;;
esac