blob: a9d45dad08412b67694bb97cc27499e9043fd4f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#! /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
|