version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
UPSSCHED.CONF |
|
|
2 |
!!!UPSSCHED.CONF |
|
|
3 |
NAME |
|
|
4 |
DESCRIPTION |
|
|
5 |
CONFIGURATION DIRECTIVES |
|
|
6 |
SEE ALSO |
|
|
7 |
---- |
|
|
8 |
!!NAME |
|
|
9 |
|
|
|
10 |
|
|
|
11 |
upssched.conf - Configuration for upssched timer program |
|
|
12 |
!!DESCRIPTION |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
This file controls the operations of upssched(8), the |
|
|
16 |
timer-based helper program for |
|
|
17 |
upsmon(8). |
|
|
18 |
!!CONFIGURATION DIRECTIVES |
|
|
19 |
|
|
|
20 |
|
|
|
21 |
CMDSCRIPT ''scriptname'' |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
Required. This must be above any AT lines. This script is |
|
|
25 |
started to invoke commands when your timers are triggered. |
|
|
26 |
It receives a single argument which is the name of the timer |
|
|
27 |
that caused it to trigger. |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
PIPEFN ''filename'' |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
This sets the file name of the FIFO that will pass |
|
|
34 |
communications between processes to start and stop timers. |
|
|
35 |
This should be set to some path where normal users can't |
|
|
36 |
create the file, due to the possibility of symlinking and |
|
|
37 |
other evil. |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
NOTE: if you are running Solaris or similar, the permissions |
|
|
41 |
that upssched sets on this file *are not enough* to keep you |
|
|
42 |
safe. If your OS ignores the permissions on a FIFO, then you |
|
|
43 |
MUST put this in a protected directory! |
|
|
44 |
|
|
|
45 |
|
|
|
46 |
Another thing to think about: upsmon doesn't run the |
|
|
47 |
NOTIFYCMD as root unless you run it with -p. So, upssched |
|
|
48 |
will probably run as nobody or similar unless you give |
|
|
49 |
upsmon another user with -u. Either way, you have to set |
|
|
50 |
PIPEFN to something that ONLY the resulting upsmon user can |
|
|
51 |
access. |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
The stock version of this file ships with PIPEFN disabled to |
|
|
55 |
make you visit this portion of the documentation and think |
|
|
56 |
about how your system works before potentially opening a |
|
|
57 |
hole. |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
AT ''notifytype upsname command'' |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
Define a handler for a specific event ''notifytype'' on |
|
|
64 |
UPS ''upsname''. ''upsname'' can be the special value |
|
|
65 |
* to apply this handler to every UPS. |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
This will perform the command ''command'' when the |
|
|
69 |
''notifytype'' and ''upsname'' match the current |
|
|
70 |
activity. Possible values for ''command'' |
|
|
71 |
are: |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
START-TIMER ''timername interval'' |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
Start a timer of ''interval'' seconds. When it triggers, it |
|
|
78 |
will pass the argument ''timername'' as an argument to your |
|
|
79 |
CMDSCRIPT. |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
Example: |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
Start a timer that'll execute when any UPS (*) has been |
|
|
86 |
gone for 10 seconds |
|
|
87 |
AT COMMBAD * START-TIMER upsgone 10 |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
CANCEL-TIMER ''timername'' |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
Cancel a running timer called |
|
|
94 |
|
|
|
95 |
|
|
|
96 |
Example: |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
If a specific UPS (myups@localhost) comes back online, then |
|
|
100 |
stop the timer before it triggers |
|
|
101 |
AT COMMOK myups@localhost CANCEL-TIMER upsgone |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
Note that any AT that matches both the ''notifytype'' and |
|
|
105 |
the ''upsname'' for the current event will be |
|
|
106 |
used. |
|
|
107 |
!!SEE ALSO |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
upssched(8), upsmon(8) |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
__Internet resources:__ |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
The NUT (Network UPS Tools) home page: |
|
|
117 |
http://www.exploits.org/nut/ |
|
|
118 |
|
|
|
119 |
|
|
|
120 |
NUT mailing list archives and information: |
|
|
121 |
http://lists.exploits.org/ |
|
|
122 |
---- |