From 45290417abf9e3558c64f9a42f3afa3ee68d6d43 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Thu, 2 Aug 2018 00:20:35 +0200 Subject: [PATCH] Plugins eoc_subscribers_count: fix shellcheck issues --- plugins/mail/eoc_subscribers_count | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/mail/eoc_subscribers_count b/plugins/mail/eoc_subscribers_count index 116d0183..e5c2097b 100755 --- a/plugins/mail/eoc_subscribers_count +++ b/plugins/mail/eoc_subscribers_count @@ -17,22 +17,21 @@ #%# capabilities=autoconf if [ "$1" = "autoconf" ]; then - echo yes + echo yes exit 0 fi -LISTNAME=`basename $0 | sed 's/^eoc_subscribers_count_//g' | tr '_' '@'` +LISTNAME=$(basename "$0" | sed 's/^eoc_subscribers_count_//g' | tr '_' '@') if [ "$1" = "config" ]; then - echo 'graph_title Number of subscribers to '${LISTNAME} + echo "graph_title Number of subscribers to ${LISTNAME}" echo 'graph_vlabel subscribers' echo 'graph_category mailinglist' echo 'subscribers.label subscribers' echo 'subscribers.draw AREA' - echo 'subscribers.info Number of subscribers to the list' + echo 'subscribers.info Number of subscribers to the list' exit 0 fi -echo -n subscribers.value\ -enemies-of-carlotta --name ${LISTNAME} --list | wc -l +printf "subscribers.value %s" "$(enemies-of-carlotta --name "${LISTNAME}" --list | wc -l)"