From dd96f1861b35c40a3ab2bb8b7518076faed75d82 Mon Sep 17 00:00:00 2001 From: shakemid Date: Fri, 20 Aug 2021 00:07:32 +0900 Subject: [PATCH] Fix switchbotmeter for pullreq https://github.com/munin-monitoring/contrib/pull/1236 --- plugins/sensors/switchbotmeter | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/plugins/sensors/switchbotmeter b/plugins/sensors/switchbotmeter index 54da678e..e482c807 100755 --- a/plugins/sensors/switchbotmeter +++ b/plugins/sensors/switchbotmeter @@ -33,6 +33,7 @@ =head1 LICENSE GPLv2 + SPDX-License-Identifier: GPL-2.0-only =head1 Magic markers @@ -58,10 +59,6 @@ interval=${interval:-0} # Temperature unit tempunit=${tempunit:-C} -autoconf() { - echo 'no' -} - config() { cat <&2 exit 1 fi @@ -113,12 +110,11 @@ fetch_api() { # Main case ${1:-} in -autoconf) - autoconf - ;; config) config - [ "${MUNIN_CAP_DIRTYCONFIG:-}" = "1" ] && fetch + if [ "${MUNIN_CAP_DIRTYCONFIG:-}" = "1" ]; then + fetch + fi ;; *) fetch