Commit 6aae0fce authored by taggart's avatar taggart
Browse files

tell the plugins where to find their defaults file, since when run by munin...

tell the plugins where to find their defaults file, since when run by munin they don't find it like they would with a normal shell
parent d28fa614
......@@ -24,5 +24,5 @@ EOF
esac
cat <<EOF
lists.value `mysql -s --batch --database=sympa --execute "select count(name_list) from list_table where status_list = 'open'"`
lists.value `mysql --defaults-file=/var/lib/munin/.my.cnf -s --batch --database=sympa --execute "select count(name_list) from list_table where status_list = 'open'"`
EOF
......@@ -67,7 +67,7 @@ cd $SPOOLDIR >/dev/null 2>/dev/null || {
exit 1
}
mysql="mysql -s --batch --database=sympa --execute"
mysql="mysql --defaults-file=/var/lib/munin/.my.cnf -s --batch --database=sympa --execute"
bulkspool_count=`$mysql "select count(*) from bulkspool_table"`
bulkspool_legit=`$mysql "select count(*) from bulkspool_table left join bulkmailer_table on bulkmailer_table.messagekey_bulkmailer=bulkspool_table.messagekey_bulkspool where bulkmailer_table.messagekey_bulkmailer IS NULL;"`
let "bulkspool_remaining = bulkspool_count - bulkspool_legit"
......
......@@ -24,5 +24,5 @@ EOF
esac
cat <<EOF
subscribers.value `mysql -s --batch --database=sympa --execute "select count(user_subscriber) from subscriber_table"`
subscribers.value `mysql --defaults-file=/var/lib/munin/.my.cnf -s --batch --database=sympa --execute "select count(user_subscriber) from subscriber_table"`
EOF
......@@ -24,5 +24,5 @@ EOF
esac
cat <<EOF
users.value `mysql -s --batch --database=sympa --execute "select count(email_user) from user_table"`
users.value `mysql --defaults-file=/var/lib/munin/.my.cnf -s --batch --database=sympa --execute "select count(email_user) from user_table"`
EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment