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:
parent
5ecffc3558
commit
0ab4b3a083
1 changed files with 12 additions and 2 deletions
|
@ -1,8 +1,18 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Plugin to monitor the battery status via the uevent API
|
# 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
|
battery_name=${0##*_}
|
||||||
percent=yes
|
percent=${percent:-"no"}
|
||||||
|
|
||||||
if [ "$1" = "config" ]
|
if [ "$1" = "config" ]
|
||||||
then
|
then
|
Loading…
Reference in a new issue