From ae13ec95c46f932c638e1aa5aab4d65aa6423e9f Mon Sep 17 00:00:00 2001 From: obma Date: Wed, 7 Oct 2015 17:09:44 +0200 Subject: [PATCH] p: fix openweather_: set correct name for multigraphs Set 'plugin_name' with 'basename $0' and use this variable instead of $0 to avoid having the full path as name for the multigraphs. --- plugins/weather/openweather_ | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/plugins/weather/openweather_ b/plugins/weather/openweather_ index a7eea886..be62596c 100755 --- a/plugins/weather/openweather_ +++ b/plugins/weather/openweather_ @@ -19,6 +19,7 @@ # env.apikey XYZ query_string=$(printf '%s' "${0#*_}" | tr '_' '=') +plugin_name=$( basename $0 ) OWAPI=$( curl -s "http://api.openweathermap.org/data/2.5/weather?mode=xml&${query_string}") # API returns temp in K, we have to convert it in C @@ -30,7 +31,7 @@ CITY=$( expr "$OWAPI" : '.*\