-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from dbaio/apcupsd
- Loading branch information
Showing
12 changed files
with
1,379 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# $FreeBSD$ | ||
|
||
PORTNAME= pfSense-pkg-apcupsd | ||
PORTVERSION= 0.3.9 | ||
CATEGORIES= sysutils | ||
MASTER_SITES= # empty | ||
DISTFILES= # empty | ||
EXTRACT_ONLY= # empty | ||
|
||
MAINTAINER= [email protected] | ||
COMMENT= pfSense package apcupsd | ||
|
||
LICENSE= ESF | ||
|
||
RUN_DEPENDS= ${LOCALBASE}/sbin/apcupsd:sysutils/apcupsd | ||
|
||
NO_BUILD= yes | ||
NO_MTREE= yes | ||
|
||
SUB_FILES= pkg-install pkg-deinstall | ||
SUB_LIST= PORTNAME=${PORTNAME} | ||
|
||
do-extract: | ||
${MKDIR} ${WRKSRC} | ||
|
||
do-install: | ||
${MKDIR} ${STAGEDIR}${PREFIX}/pkg | ||
${MKDIR} ${STAGEDIR}${PREFIX}/www | ||
${MKDIR} ${STAGEDIR}/etc/inc/priv | ||
${MKDIR} ${STAGEDIR}${DATADIR} | ||
${INSTALL_DATA} -m 0644 ${FILESDIR}${PREFIX}/pkg/apcupsd.xml \ | ||
${STAGEDIR}${PREFIX}/pkg | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/pkg/apcupsd.inc \ | ||
${STAGEDIR}${PREFIX}/pkg | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/www/apcupsd_status.php \ | ||
${STAGEDIR}${PREFIX}/www | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/pkg/apcupsd.conf.php \ | ||
${STAGEDIR}${PREFIX}/pkg | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/pkg/apcupsd_mail.php \ | ||
${STAGEDIR}${PREFIX}/pkg | ||
${INSTALL_DATA} ${FILESDIR}/etc/inc/priv/apcupsd.priv.inc \ | ||
${STAGEDIR}/etc/inc/priv | ||
${INSTALL_DATA} ${FILESDIR}${DATADIR}/info.xml \ | ||
${STAGEDIR}${DATADIR} | ||
@${REINPLACE_CMD} -i '' -e "s|%%PKGVERSION%%|${PKGVERSION}|" \ | ||
${STAGEDIR}${DATADIR}/info.xml | ||
|
||
.include <bsd.port.mk> |
38 changes: 38 additions & 0 deletions
38
sysutils/pfSense-pkg-apcupsd/files/etc/inc/priv/apcupsd.priv.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/* | ||
apcupsd.priv.inc | ||
part of pfSense (http://www.pfSense.org/) | ||
Copyright (C) 2015 ESF, LLC | ||
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. | ||
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. | ||
THIS SOFTWARE IS PROVIDED ``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. | ||
*/ | ||
global $priv_list; | ||
|
||
$priv_list['page-services-apcupsd'] = array(); | ||
$priv_list['page-services-apcupsd']['name'] = "WebCfg - Services: apcupsd"; | ||
$priv_list['page-services-apcupsd']['descr'] = "Allow access to apcupsd package GUI"; | ||
$priv_list['page-services-apcupsd']['match'] = array(); | ||
$priv_list['page-services-apcupsd']['match'][] = "pkg_edit.php?xml=apcupsd.xml*"; | ||
$priv_list['page-services-apcupsd']['match'][] = "apcupsd_status.php*"; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
/usr/local/bin/php -f /etc/rc.packages %%PORTNAME%% ${2} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
if [ "${2}" != "POST-INSTALL" ]; then | ||
exit 0 | ||
fi | ||
|
||
/usr/local/bin/php -f /etc/rc.packages %%PORTNAME%% ${2} |
Oops, something went wrong.