From 16cf6be1ee090093ad99e006b6ffcb9734d779f4 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sun, 29 Sep 2013 03:52:41 +0000 Subject: Add license. Fix the acutal matching of user and command entries in config files. Use -m on su to be able to execute under user priviliges of users without a login shell. Use eval before env to expand environment variables. --- minimunin | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/minimunin b/minimunin index c42ce59..cc173c9 100755 --- a/minimunin +++ b/minimunin @@ -1,4 +1,10 @@ #!/bin/sh +# +# This script was written by erdgeist@erdgeist.org +# The code is released under the beer ware license, this means do whatever you +# want with it, as long as you leave this notice along with the code. +# Should we meet some day and you find the code is worth it, let's enjoy a beer +# together. PLUGIN_DIR=/usr/local/etc/minimunin-plugins CONFIG_DIR=/usr/local/etc/minimunin-configs @@ -335,17 +341,18 @@ call_plugin() { _pref=${line#*env.} _env="${env} ${_pref%% *}='${_pref#* }'" ;; - user ) _user=${line#*user } + user\ *) _user=${line#*user } ;; - command ) _command=${line#*command } + command\ *) _command=${line#*command } ;; esac done <