freebsd-ports/sysutils/munin-node/pkg-install
2016-12-26 17:30:00 +00:00

24 lines
471 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."
}
########################################################################
case $2 in
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
init_plugins
fi
;;
esac