mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
sysutils/nut: merge version 1.0 from master
This commit is contained in:
parent
af2922b7d6
commit
eb60ccf81e
2 changed files with 28 additions and 24 deletions
|
|
@ -1,8 +1,7 @@
|
|||
PLUGIN_NAME= nut
|
||||
PLUGIN_VERSION= 0.6
|
||||
PLUGIN_VERSION= 1.0
|
||||
PLUGIN_COMMENT= Network UPS Tools
|
||||
PLUGIN_DEPENDS= nut
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
PLUGIN_DEVEL= yes
|
||||
|
||||
.include "../../Mk/plugins.mk"
|
||||
|
|
|
|||
|
|
@ -44,30 +44,35 @@ function nut_services()
|
|||
{
|
||||
$services = array();
|
||||
|
||||
if (nut_enabled()) {
|
||||
$services[] = array(
|
||||
'description' => gettext('Network UPS Tools'),
|
||||
'configd' => array(
|
||||
'restart' => array('nut restart'),
|
||||
'start' => array('nut start'),
|
||||
'stop' => array('nut stop'),
|
||||
),
|
||||
'name' => 'nut',
|
||||
'pidfile' => '/var/db/nut/upsd.pid'
|
||||
);
|
||||
if (!nut_enabled()) {
|
||||
return $services;
|
||||
}
|
||||
if (nut_enabled() && nut_netclient()) {
|
||||
$services[] = array(
|
||||
'description' => gettext('Network UPS Monitor'),
|
||||
'configd' => array(
|
||||
'restart' => array('nut restart'),
|
||||
'start' => array('nut start'),
|
||||
'stop' => array('nut stop'),
|
||||
),
|
||||
'name' => 'upsmon',
|
||||
'pidfile' => '/var/db/nut/upsmon.pid'
|
||||
);
|
||||
|
||||
$services[] = array(
|
||||
'description' => gettext('Network UPS Monitor'),
|
||||
'configd' => array(
|
||||
'restart' => array('nut restart'),
|
||||
'start' => array('nut start'),
|
||||
'stop' => array('nut stop'),
|
||||
),
|
||||
'pidfile' => '/var/db/nut/upsmon.pid',
|
||||
'name' => 'nut_upsmon',
|
||||
);
|
||||
|
||||
if (nut_netclient()) {
|
||||
return $services;
|
||||
}
|
||||
|
||||
$services[] = array(
|
||||
'description' => gettext('Network UPS Tools'),
|
||||
'configd' => array(
|
||||
'restart' => array('nut restart'),
|
||||
'start' => array('nut start'),
|
||||
'stop' => array('nut stop'),
|
||||
),
|
||||
'pidfile' => '/var/db/nut/upsd.pid',
|
||||
'name' => 'nut_daemon',
|
||||
);
|
||||
|
||||
return $services;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue