initial commit of file from CVS for e-smith-nutUPS on Wed 12 Jul 09:01:20 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:01:20 +01:00
parent d9332aba34
commit 667523a800
63 changed files with 1241 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
{
my $model = $nut{Model} || "usbhid-ups";
my $device = $nut{Device} || "/var/lib/ups/hiddev0";
my $type = $nut{Type};
my $mfr = $nut{mfr};
my $mdl = $nut{mdl};
$OUT .= "[UPS]\n";
$OUT .= "\tdriver = $model\n";
if ($model eq 'genericups')
{
$OUT .= "\tupstype = $type\n" if defined $type;
$OUT .= "\tmfr = $mfr\n" if defined $mfr;
$OUT .= "\tmodel = $mdl\n" if defined $mdl;
}
$OUT .= "\tport = $device\n";
}

View File

@@ -0,0 +1,6 @@
{
my $access = $nut{access} || 'localhost';
$OUT .= "LISTEN 127.0.0.1";
$OUT .= "\nLISTEN $LocalIP" if ($access eq 'private');
}

View File

@@ -0,0 +1,8 @@
[upsmaster]
password = { $nut{MasterPass} }
upsmon master
[upsslave]
password = { $nut{SlavePass} }
upsmon slave

View File

@@ -0,0 +1,14 @@
{
# create admin user for upsd to allow setting of
# UPS parameters via upsrw
$OUT .= "";
return unless (($nut{AdminUser} || 'disabled') eq 'enabled');
return unless (($nut{AdminPass} || '') ne '');
$OUT .= "\n";
$OUT .= " [admin]\n";
$OUT .= " password = $nut{AdminPass}\n";
$OUT .= " actions = set\n";
$OUT .= " instcmds = all\n";
}

View File

@@ -0,0 +1 @@
DEADTIME 15

View File

@@ -0,0 +1 @@
FINALDELAY 5

View File

@@ -0,0 +1 @@
HOSTSYNC 15

View File

@@ -0,0 +1 @@
MINSUPPLIES 1

View File

@@ -0,0 +1,7 @@
{
if ( ($nut{Master} || 'yes') ne 'no' ) {
$OUT = "MONITOR UPS\@localhost 1 upsmaster $nut{MasterPass} master";
} else {
$OUT = "MONITOR $nut{SlaveUPS} 1 upsslave $nut{SlavePass} slave";
}
}

View File

@@ -0,0 +1 @@
NOCOMMWARNTIME 300

View File

@@ -0,0 +1 @@
NOTIFYCMD /sbin/e-smith/nutUPS.notify

View File

@@ -0,0 +1,9 @@
NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC
NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC
NOTIFYFLAG FSD SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC

View File

@@ -0,0 +1 @@
POLLFREQ 5

View File

@@ -0,0 +1 @@
POLLFREQALERT 5

View File

@@ -0,0 +1 @@
POWERDOWNFLAG /etc/killpower

View File

@@ -0,0 +1 @@
RBWARNTIME 43200

View File

@@ -0,0 +1 @@
SHUTDOWNCMD "/sbin/e-smith/signal-event halt"

View File

@@ -0,0 +1 @@
# For more information see "man upssched.conf"