From 42b70535936dc51803cccdf03cd6e01352d8cc82 Mon Sep 17 00:00:00 2001 From: "Kim B. Heino" Date: Thu, 8 Oct 2020 10:46:53 +0300 Subject: [PATCH] muninlite: add support for minimal runtime configuration file It's executed as shell script. For example, you can remove unwanted plugin by adding following line to /etc/munin/muninlite.conf: PLUGINS=${PLUGINS/ swap/} It could also be used to add more plugins (with runtime on/off detection!), although pluginsdir is the preferred way to do it. It can also be used to override other hardcoded settings, like NTP_PEER or DF_IGNORE_FILESYSTEM_REGEX. --- muninlite.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/muninlite.in b/muninlite.in index e9e421f..f6f4c34 100755 --- a/muninlite.in +++ b/muninlite.in @@ -16,6 +16,9 @@ set -eu @@CONF@@ +# Name of runtime configuration file +CONFIG_FILE=/etc/munin/muninlite.conf + # if plugindir_ is present in $PLUGINS, executables (scripts, binaries) in the specified path # and matching the pattern will be scanned and operated as plugins PLUGIN_DIRECTORY=/etc/munin/plugins @@ -69,6 +72,7 @@ do_quit() { } # ===== Runtime config ===== +[ -f ${CONFIG_FILE} ] && . ${CONFIG_FILE} RES="" for PLUG in $PLUGINS; do case "$PLUG" in