1UPSSCHED.CONF(5)                  NUT Manual                  UPSSCHED.CONF(5)
2
3
4

NAME

6       upssched.conf - Configuration for upssched timer program
7

DESCRIPTION

9       This file controls the operations of upssched(8), the timer-based
10       helper program for upsmon(8).
11

CONFIGURATION DIRECTIVES

13       CMDSCRIPT scriptname
14           Required. This must be above any AT lines. This script is used to
15           invoke commands when your timers are triggered. It receives a
16           single argument which is the name of the timer that caused it to
17           trigger.
18
19       PIPEFN filename
20           Required. This sets the file name of the socket which will be used
21           for interprocess communications. This should be in a directory
22           where normal users can’t create the file, due to the possibility of
23           symlinking and other evil.
24
25           Caution
26           if you are running Solaris or similar, the permissions that
27           upssched sets on this file are not enough to keep you safe. If your
28           OS ignores the permissions on a FIFO, then you MUST put this in a
29           protected directory!
30
31           Note
32           by default, upsmon(8) will run upssched as whatever user you have
33           defined with RUN_AS_USER in upsmon.conf(8). Make sure that user can
34           create files and write to files in the path you use for PIPEFN and
35           LOCKFN.
36
37       My recommendation: create a special directory for upssched, make it
38       owned by your upsmon user, then use it for both.
39
40       The stock version of the upssched.conf ships with PIPEFN disabled to
41       make you visit this portion of the documentation and think about how
42       your system works before potentially opening a security hole.
43
44       LOCKFN filename
45           Required. upssched attempts to create this file in order to avoid a
46           race condition when two events are dispatched from upsmon at nearly
47           the same time. This file will only exist briefly. It must not be
48           created by any other process.
49
50           You should put this in the same directory as PIPEFN.
51
52       AT notifytype upsname command
53           Define a handler for a specific event notifytype on UPS upsname.
54           upsname can be the special value * to apply this handler to every
55           UPS.
56
57           This will perform the command command when the notifytype and
58           upsname match the current activity. Possible values for command
59           are:
60
61           START-TIMER timername interval
62               Start a timer of interval seconds. When it triggers, it will
63               pass the argument timername as an argument to your CMDSCRIPT.
64
65               Example:
66
67               Start a timer that’ll execute when any UPS (*) has been gone
68               for 10 seconds
69
70                   AT COMMBAD * START-TIMER upsgone 10
71
72           CANCEL-TIMER timername [cmd]
73               Cancel a running timer called timername, if possible. If the
74               timer has passed then pass the optional argument cmd to
75               CMDSCRIPT.
76
77               Example:
78
79               If a specific UPS (myups@localhost) comes back online, then
80               stop the timer before it triggers
81
82                   AT COMMOK myups@localhost CANCEL-TIMER upsgone
83
84           EXECUTE command
85               Immediately pass command as an argument to CMDSCRIPT.
86
87               Example:
88
89               If any UPS (*) reverts to utility power, then execute
90               ups-back-on-line via CMDSCRIPT.
91
92                   AT ONLINE * EXECUTE ups-back-on-line
93
94       Note that any AT that matches both the notifytype and the upsname for
95       the current event will be used.
96
97       For a complete list of notifytype possible values, refer to the section
98       NOTIFY EVENTS in upsmon(8).
99

SEE ALSO

101       upssched(8), upsmon(8)
102
103   Internet resources:
104       The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
105
106
107
108Network UPS Tools 2.7.3.          12/29/2015                  UPSSCHED.CONF(5)
Impressum