10
10
.SH CONFIGURATION DIRECTIVES
12
12
.IP "CMDSCRIPT \fIscriptname\fR"
13
Required. This must be above any AT lines. This script is started to
13
Required. This must be above any AT lines. This script is used to
14
14
invoke commands when your timers are triggered. It receives a single
15
15
argument which is the name of the timer that caused it to trigger.
20
20
normal users can't create the file, due to the possibility of symlinking
23
NOTE: if you are running Solaris or similar, the permissions that upssched
24
sets on this file *are not enough* to keep you safe. If your OS ignores
25
the permissions on a FIFO, then you MUST put this in a protected directory!
27
Another thing to think about: upsmon doesn't run the NOTIFYCMD as root
28
unless you run it with -p. So, upssched will probably run as nobody
29
or similar unless you give upsmon another user with -u. Either way,
30
you have to set PIPEFN to something that ONLY the resulting upsmon
33
The stock version of this file ships with PIPEFN disabled to make you
34
visit this portion of the documentation and think about how your system
35
works before potentially opening a hole.
23
Note: if you are running Solaris or similar, the permissions that
24
upssched sets on this file \fBare not enough\fR to keep you safe. If
25
your OS ignores the permissions on a FIFO, then you MUST put this in a
28
Note 2: by default, \fBupsmon\fR(8) will run upssched as whatever user
29
you have defined with RUN_AS_USER in \fBupsmon.conf\fR(8). Make sure
30
that user can create files and write to files in the path you use for
33
My recommendation: create a special directory for upssched, make it
34
owned by your upsmon user, then use it for both.
36
The stock version of the upssched.conf ships with PIPEFN disabled
37
to make you visit this portion of the documentation and think about how
38
your system works before potentially opening a security hole.
40
.IP "LOCKFN \fIfilename\fR"
41
REQUIRED. This was added after version 1.2.1.
43
upssched needs to be able to create this filename in order to avoid
44
a race condition when two events are dispatched from upsmon at nearly
45
the same time. This file will only exist briefly. It must not be
46
created by any other process.
48
You should put this in the same directory as PIPEFN.
37
50
.IP "AT \fInotifytype\fR \fIupsname\fR \fIcommand\fR"
38
51
Define a handler for a specific event \fInotifytype\fR on UPS
66
CANCEL-TIMER \fItimername\fR
79
CANCEL-TIMER \fItimername\fR [cmd]
69
Cancel a running timer called <timername>, if possible.
82
Cancel a running timer called <timername>, if possible.
83
If the timer has passed then pass the optional argument
100
EXECUTE \fIcommand\fR
103
Immediately pass <command> as an argument to CMDSCRIPT.
111
If any UPS (*) reverts to utility power, then execute
112
'ups-back-on-line' via CMDSCRIPT.
114
AT ONLINE * EXECUTE ups-back-on-line
85
119
Note that any AT that matches both the \fInotifytype\fR and the
86
120
\fIupsname\fR for the current event will be used.
89
123
\fBupssched\fR(8), \fBupsmon\fR(8)
91
125
.SS Internet resources:
92
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/
94
NUT mailing list archives and information: http://lists.exploits.org/
126
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/