aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoritetcu <itetcu@FreeBSD.org>2006-08-16 00:09:38 +0800
committeritetcu <itetcu@FreeBSD.org>2006-08-16 00:09:38 +0800
commitc6e7eaaf12ab076ff2e642ca0203e1f0dcc26fd8 (patch)
tree5f93db8a7dc16a79e73d6a93b7d0038cd09a08ad /sysutils
parenta6a035eee12c2032abd66e657e50151350e1abf0 (diff)
downloadfreebsd-ports-gnome-c6e7eaaf12ab076ff2e642ca0203e1f0dcc26fd8.tar.gz
freebsd-ports-gnome-c6e7eaaf12ab076ff2e642ca0203e1f0dcc26fd8.tar.zst
freebsd-ports-gnome-c6e7eaaf12ab076ff2e642ca0203e1f0dcc26fd8.zip
The upsdaemon is a simple program to monitor APC-Pro series UPSes.
When the power fail, the UpsDaemon it effects shutdown the system. WWW: http://www.ederbs.org/projects/upsdaemon/ - Ederson de Moura ederbs@ederbs.org PR: ports/101841 Submitted by: Ederson de Moura <ederbs at ederbs.org>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/upsdaemon/Makefile25
-rw-r--r--sysutils/upsdaemon/distinfo3
-rw-r--r--sysutils/upsdaemon/files/upsdaemon.in55
-rw-r--r--sysutils/upsdaemon/pkg-descr8
-rw-r--r--sysutils/upsdaemon/pkg-message7
-rw-r--r--sysutils/upsdaemon/pkg-plist4
7 files changed, 103 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 56a7f4f7e5bd..98fb6f21c9ca 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -597,6 +597,7 @@
SUBDIR += unieject
SUBDIR += unquote
SUBDIR += upsd
+ SUBDIR += upsdaemon
SUBDIR += upsmon
SUBDIR += uptimec
SUBDIR += uptimed
diff --git a/sysutils/upsdaemon/Makefile b/sysutils/upsdaemon/Makefile
new file mode 100644
index 000000000000..010069b68d6c
--- /dev/null
+++ b/sysutils/upsdaemon/Makefile
@@ -0,0 +1,25 @@
+# New ports collection makefile for: UpsDaemon
+# Date created: 17 June 2006
+# Whom: Ederson de Moura <ederbs@ederbs.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= upsdaemon
+PORTVERSION= 1.0
+CATEGORIES= sysutils
+MASTER_SITES= http://www.ederbs.org/pub/ \
+ ftp://ederbs.org/pub/
+
+MAINTAINER= ederbs@ederbs.org
+COMMENT= Simple APC UPS Daemon
+
+MAN8= upsdaemon.8
+MANCOMPRESSED= no
+
+USE_RC_SUBR= upsdaemon
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/sysutils/upsdaemon/distinfo b/sysutils/upsdaemon/distinfo
new file mode 100644
index 000000000000..7bc1a90924b5
--- /dev/null
+++ b/sysutils/upsdaemon/distinfo
@@ -0,0 +1,3 @@
+MD5 (upsdaemon-1.0.tar.gz) = 68791c1f42af9c002cafc30c8514e53f
+SHA256 (upsdaemon-1.0.tar.gz) = c89cf173cb4229c4b2ca23120c3c48770aeca6b621d05666f05aea8bc0f28981
+SIZE (upsdaemon-1.0.tar.gz) = 30720
diff --git a/sysutils/upsdaemon/files/upsdaemon.in b/sysutils/upsdaemon/files/upsdaemon.in
new file mode 100644
index 000000000000..19a1d89374e8
--- /dev/null
+++ b/sysutils/upsdaemon/files/upsdaemon.in
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Copyright (c) 1995, 2006 Ederson de Moura <ederbs@ederbs.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer
+# in this position and unchanged.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# PROVIDE: upsdaemon
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following to /etc/rc.conf to enable this service
+#
+# upsdaemon_enable="YES"
+
+. /etc/rc.subr
+
+name=upsdaemon
+rcvar=`set_rcvar`
+
+command=/usr/local/sbin/upsdaemon
+
+upsdaemon=${upsdaemon:-"/usr/local/libexec/upsdaemon/upsdaemon-alerts"}
+
+required_files="${upsdaemon}"
+
+pidfile=/var/run/upsdaemon.pid
+
+upsdaemon_enable=${upsdaemon_enable:-"NO"}
+start_precmd="${upsdaemon_start_precmd}"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/upsdaemon/pkg-descr b/sysutils/upsdaemon/pkg-descr
new file mode 100644
index 000000000000..70c9b7e4da92
--- /dev/null
+++ b/sysutils/upsdaemon/pkg-descr
@@ -0,0 +1,8 @@
+
+The upsdaemon is a simple program to monitor APC-Pro series UPSes.
+When the power fail, the UpsDaemon it effects shutdown the system.
+
+WWW: http://www.ederbs.org/projects/upsdaemon/
+
+- Ederson de Moura
+ederbs@ederbs.org
diff --git a/sysutils/upsdaemon/pkg-message b/sysutils/upsdaemon/pkg-message
new file mode 100644
index 000000000000..f04f449e4a74
--- /dev/null
+++ b/sysutils/upsdaemon/pkg-message
@@ -0,0 +1,7 @@
+*************************************************
+NOTICE:
+
+ To run UpsDaemon from startup add
+ upsdaemon_enable="YES" in rc.conf
+
+*************************************************
diff --git a/sysutils/upsdaemon/pkg-plist b/sysutils/upsdaemon/pkg-plist
new file mode 100644
index 000000000000..616e8896edc7
--- /dev/null
+++ b/sysutils/upsdaemon/pkg-plist
@@ -0,0 +1,4 @@
+sbin/upsdaemon
+libexec/upsdaemon/upsdaemon-alerts
+libexec/upsdaemon/upsdaemon.sh
+@dirrm libexec/upsdaemon