1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-07 11:49:40 +00:00
2014-12-11 07:59:03 +00:00

38 lines
736 B
Bash

#! /bin/sh
init_plugins() {
if [ -f /tmp/.munin-node.version ]; then
prevver=$(cat /tmp/.munin-node.version)
fi
if [ -n "$prevver" ]; then
echo -n "Initializing new plugins.."
${PKG_PREFIX}/sbin/munin-node-configure --shell --newer "${prevver%-*}" | sh -x
fi
echo "done."
}
newsyslog() {
if grep -q /var/log/munin/munin-node.log /etc/newsyslog.conf; then
:
else
cat >> /etc/newsyslog.conf <<EOT
/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid
EOT
fi
}
########################################################################
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
init_plugins
newsyslog
fi
;;
esac