initial commit of file from CVS for e-smith-nutUPS on Wed 12 Jul 09:01:20 BST 2023
This commit is contained in:
16
root/etc/e-smith/templates/etc/ups/ups.conf/UPS
Normal file
16
root/etc/e-smith/templates/etc/ups/ups.conf/UPS
Normal 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";
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
my $access = $nut{access} || 'localhost';
|
||||
|
||||
$OUT .= "LISTEN 127.0.0.1";
|
||||
$OUT .= "\nLISTEN $LocalIP" if ($access eq 'private');
|
||||
}
|
8
root/etc/e-smith/templates/etc/ups/upsd.users/monitor
Normal file
8
root/etc/e-smith/templates/etc/ups/upsd.users/monitor
Normal file
@@ -0,0 +1,8 @@
|
||||
[upsmaster]
|
||||
password = { $nut{MasterPass} }
|
||||
upsmon master
|
||||
|
||||
[upsslave]
|
||||
password = { $nut{SlavePass} }
|
||||
upsmon slave
|
||||
|
@@ -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";
|
||||
}
|
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/DEADTIME
Normal file
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/DEADTIME
Normal file
@@ -0,0 +1 @@
|
||||
DEADTIME 15
|
@@ -0,0 +1 @@
|
||||
FINALDELAY 5
|
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/HOSTSYNC
Normal file
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/HOSTSYNC
Normal file
@@ -0,0 +1 @@
|
||||
HOSTSYNC 15
|
@@ -0,0 +1 @@
|
||||
MINSUPPLIES 1
|
7
root/etc/e-smith/templates/etc/ups/upsmon.conf/MONITOR
Normal file
7
root/etc/e-smith/templates/etc/ups/upsmon.conf/MONITOR
Normal 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";
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
NOCOMMWARNTIME 300
|
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/NOTIFYCMD
Normal file
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/NOTIFYCMD
Normal file
@@ -0,0 +1 @@
|
||||
NOTIFYCMD /sbin/e-smith/nutUPS.notify
|
@@ -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
|
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/POLLFREQ
Normal file
1
root/etc/e-smith/templates/etc/ups/upsmon.conf/POLLFREQ
Normal file
@@ -0,0 +1 @@
|
||||
POLLFREQ 5
|
@@ -0,0 +1 @@
|
||||
POLLFREQALERT 5
|
@@ -0,0 +1 @@
|
||||
POWERDOWNFLAG /etc/killpower
|
@@ -0,0 +1 @@
|
||||
RBWARNTIME 43200
|
@@ -0,0 +1 @@
|
||||
SHUTDOWNCMD "/sbin/e-smith/signal-event halt"
|
@@ -0,0 +1 @@
|
||||
# For more information see "man upssched.conf"
|
Reference in New Issue
Block a user