Projet

Général

Profil

Révision 0ab4b3a0

ID0ab4b3a083248e7ed205a1db9939b7622d086ddc
Parent 5ecffc35
Enfant 8f2c1437

Ajouté par Steve Schnepp il y a environ 10 ans

battery_: make a wildcard plugin

Voir les différences:

plugins/sensors/battery_
1 1
#! /bin/sh
2 2
# Plugin to monitor the battery status via the uevent API
3
#
4
# (c) 2015 - GPLv2 - steve.schnepp@pwkf.org
5
#
6
# It is a wildcard plugin, symlink it with the battery directory
7
# default is to display charge as mAh, but you can also use percentage if you
8
# prefer, by setting the env var "percent" to "yes".
9
#
10
# [battery_*]
11
# env.percent no
12
#
3 13

  
4
battery_name=CMB1
5
percent=yes
14
battery_name=${0##*_}
15
percent=${percent:-"no"}
6 16

  
7 17
if [ "$1" = "config" ]
8 18
then

Formats disponibles : Unified diff