~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to conf/upssched.conf

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Quette
  • Date: 2004-05-28 13:10:01 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040528131001-yj2m9qcez4ya2w14
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
# normal users can't create the file, due to the possibility of symlinking
26
26
# and other evil.
27
27
#
28
 
# NOTE: if you are running Solaris or similar, the permissions that upssched
29
 
# sets on this file *are not enough* to keep you safe.  If your OS ignores
30
 
# the permissions on a FIFO, then you MUST put this in a protected directory!
31
 
#
32
 
# Another thing to think about: upsmon doesn't run the NOTIFYCMD as root
33
 
# unless you run it with -p.  So, upssched will probably run as nobody
34
 
# or similar unless you give upsmon another user with -u.  Either way,
35
 
# you have to set PIPEFN to something that ONLY the resulting upsmon 
36
 
# user can access.
 
28
# Note: if you are running Solaris or similar, the permissions that 
 
29
# upssched sets on this file *are not enough* to keep you safe.  If
 
30
# your OS ignores the permissions on a FIFO, then you MUST put this in
 
31
# a protected directory!
 
32
#
 
33
# Note 2: by default, upsmon will run upssched as whatever user you have
 
34
# defined with RUN_AS_USER in upsmon.conf.  Make sure that user can
 
35
# create files and write to files in the path you use for PIPEFN and
 
36
# LOCKFN.
 
37
#
 
38
# My recommendation: create a special directory for upssched, make it
 
39
# owned by your upsmon user, then use it for both.
37
40
#
38
41
# This is commented out by default to make you visit this file and think
39
42
# about how your system works before potentially opening a hole.
40
43
#
41
 
# PIPEFN /var/run/upssched.pipe
 
44
# PIPEFN /var/run/upssched/upssched.pipe
 
45
 
 
46
# ============================================================================
 
47
#
 
48
# LOCKFN <filename>
 
49
#
 
50
# REQUIRED.  This was added after version 1.2.1.
 
51
#
 
52
# upssched needs to be able to create this filename in order to avoid
 
53
# a race condition when two events are dispatched from upsmon at nearly
 
54
# the same time.  This file will only exist briefly.  It must not be
 
55
# created by any other process.
 
56
#
 
57
# You should put this in the same directory as PIPEFN.
 
58
#
 
59
# LOCKFN /var/run/upssched/upssched.lock
42
60
 
43
61
# ============================================================================
44
62
#
71
89
 
72
90
#   -----------------------------------------------------------------------
73
91
#
74
 
# - CANCEL-TIMER <timername>
 
92
# - CANCEL-TIMER <timername> [cmd]
75
93
#
76
 
#   Cancel a running timer called <timername>, if possible.
 
94
#   Cancel a running timer called <timername>, if possible. If the timer
 
95
#   has passed then pass the optional argument <cmd> to CMDSCRIPT.
77
96
#
78
97
#   Example:
79
98
#   If a specific UPS (myups@localhost) comes back online, then stop the 
80
99
#   timer before it triggers
81
100
82
101
#   AT COMMOK myups@localhost CANCEL-TIMER upsgone
 
102
 
 
103
#   -----------------------------------------------------------------------
 
104
#
 
105
# - EXECUTE <command>
 
106
#
 
107
#   Immediately pass <command> as an argument to CMDSCRIPT.
 
108
#
 
109
#   Example:
 
110
#   If any UPS (*) reverts to utility power, then execute
 
111
#   'ups-back-on-line' via CMDSCRIPT.
 
112
#
 
113
#   AT ONLINE * EXECUTE ups-back-on-line