2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

battery_: make a wildcard plugin

This commit is contained in:
Steve Schnepp 2015-09-03 17:14:15 +02:00
parent 5ecffc3558
commit 0ab4b3a083

View File

@ -1,8 +1,18 @@
#! /bin/sh
# Plugin to monitor the battery status via the uevent API
#
# (c) 2015 - GPLv2 - steve.schnepp@pwkf.org
#
# It is a wildcard plugin, symlink it with the battery directory
# default is to display charge as mAh, but you can also use percentage if you
# prefer, by setting the env var "percent" to "yes".
#
# [battery_*]
# env.percent no
#
battery_name=CMB1
percent=yes
battery_name=${0##*_}
percent=${percent:-"no"}
if [ "$1" = "config" ]
then