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