~iheino+ub/+junk/nut-upsconf-docfix

« back to all changes in this revision

Viewing changes to clients/upssched-cmd

  • Committer: Tuomas Heino
  • Author(s): Laurent Bigonville
  • Date: 2014-04-22 20:46:12 UTC
  • Revision ID: iheino+ub@cc.hut.fi-20140422204612-1x2gh3nkezfsdao4
Tags: upstream-2.7.2
ImportĀ upstreamĀ versionĀ 2.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# This script should be called by upssched via the CMDSCRIPT directive.
 
4
 
5
# Here is a quick example to show how to handle a bunch of possible
 
6
# timer names with the help of the case structure.
 
7
#
 
8
# This script may be replaced with another program without harm.
 
9
#
 
10
# The first argument passed to your CMDSCRIPT is the name of the timer
 
11
# from your AT lines.
 
12
 
 
13
case $1 in
 
14
        upsgone)
 
15
                logger -t upssched-cmd "The UPS has been gone for awhile"
 
16
                ;;
 
17
        *)
 
18
                logger -t upssched-cmd "Unrecognized command: $1"
 
19
                ;;
 
20
esac
 
21