ACC SHELL
Powerd version 2.0.2 by James Brents <DaSyonic@users.sourceforge.net>
powerd: Docs arent fully done, but let me explain the configuration file:
Things to put in a config file, see powerd.conf.peer and
powerd.conf.monitor for 2 powerd.conf examples. See the man powerd.conf
man page for even further information.
You may now use hostnames in the configuration file - if the hostname has
multiple IPs, it will use all of them.
What mode are we in? In MONITOR mode, we watch a UPS and if the power goes
out, we will notify those listed with NOTIFY. under PEER mode, we wait for
a daemon in MONITOR mode that has set itself to notify us of when the
power goes out.
MODE MONITOR -or- MODE PEER
Commands in MONITOR mode:
Device to monitor:
MONITOR /dev/ttyS0
And most importantly, the configuration of the UPS in the event of a
powerfail:
Im going to list some common configurations.
You can now get the proper line to use with the detectups program
distributed with this application. Simply run:
detectups <device> (device being the serial port its connected to)
POWERFAIL CAR HIGH <-- this means that when the CAR line is HIGH
the power is out
POWERFAIL CTS LOW <-- This means that when the CTS line is LOW,
the power is out
When the power goes out, notify 2 hosts, each using the same password 'Booga'
You may use more than 1; On one we notify a host using port 5372:
NOTIFY 172.16.1.1 Booga
NOTIFY 172.16.2.2:5372 Booga
Commands in PEER mode:
What hosts do we listen from? You can specify more than 1, the final
command is the password:
LISTEN 172.16.1.1 Booga
LISTEN 172.16.2.2 Booga
What port do we listen on? This is optional, but allows you to change what
port we listen on in daemon mode
LISTENPORT 5372
The daemon must be run as root - you can configure it to drop root
privlidges as soon as it binds to the port and reads everything, but it
will reclaim root when it sends the SIGPWR signal to init notifying it
that the power is out. After that it will return to its normal user state.
See config.h for configurable settings.
I hope this document makes sense. It is sort of a crude method of a config
file, but it works, and this release is still BETA.
Thank you for using powerd, feel free to send any suggestions to me
http://power.sourceforge.net
DaSyonic@users.sourceforge.net
------
All software is under the GNU GPL, and documentation is under the GNU Free
Documentation License. See COPYING for both licenses.
Copyright (c) 2001 James Brents.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
ACC SHELL 2018