From 389c22a0debd1b40b0a514d91b33e499e5d8e36d Mon Sep 17 00:00:00 2001 From: "Kim B. Heino" Date: Thu, 8 Oct 2020 15:02:37 +0300 Subject: [PATCH] muninlite: add support for minimal runtime configuration file (#10) 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/muninlite.in b/muninlite.in index 8db88ac..73584c8 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,8 @@ do_quit() { } # ===== Runtime config ===== +# shellcheck source=/dev/null +[ -f ${CONFIG_FILE} ] && . ${CONFIG_FILE} RES="" for PLUG in $PLUGINS; do case "$PLUG" in