Now that we have a working configuration for the
apcupsd, we can go on and configure the network capabilities of the daemon. The aim is to tell the other machines that areÂ connected toÂ the same USV to shut down when running on batteries. In the first stage, we will focus on the machine that is connected via USB to the USV, from now on called master. All we have to do is to comment out and change the following lines in the configuration file:
UPSCLASS netmaster UPSMODE net These tell the
apcupsd daemon that it acts as a network server (opening a TCP-port on the master). The network portÂ can be configured via the
NETPORT directive. Usually the default (6666) will do. The last thing to configure is to tell the master which other machines are connected and have to be notified of the shut down. The directive isÂ called
SLAVE. As the value either the IP address orÂ the host name (not necessarily fully qualified) will do, but make sure that even in the case of a power outage the DNS server is reachable and hence the host names resolve. In the next post I will describe how to configure the slaves.