-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UDP Broadcast Relay GUI package. Implement #10818
- Loading branch information
Showing
11 changed files
with
1,083 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,47 @@ | ||
PORTNAME= pfSense-pkg-udpbroadcastrelay | ||
PORTVERSION= 1.0 | ||
PORTREVISION= 0 | ||
CATEGORIES= net | ||
MASTER_SITES= # empty | ||
DISTFILES= # empty | ||
EXTRACT_ONLY= # empty | ||
|
||
MAINTAINER= coreteam@pfsense.org | ||
COMMENT= pfSense package UDP Broadcast Relay | ||
|
||
LICENSE= APACHE20 | ||
|
||
RUN_DEPENDS= udpbroadcastrelay>0:net/udpbroadcastrelay | ||
|
||
NO_BUILD= yes | ||
NO_MTREE= yes | ||
|
||
SUB_FILES= pkg-install pkg-deinstall | ||
SUB_LIST= PORTNAME=${PORTNAME} | ||
|
||
do-extract: | ||
${MKDIR} ${WRKSRC} | ||
|
||
do-install: | ||
${MKDIR} ${STAGEDIR}/etc/inc/priv | ||
${MKDIR} ${STAGEDIR}${PREFIX}/pkg/udpbroadcastrelay | ||
${MKDIR} ${STAGEDIR}${PREFIX}/www | ||
${MKDIR} ${STAGEDIR}${DATADIR} | ||
|
||
${INSTALL_DATA} ${FILESDIR}/etc/inc/priv/udpbroadcastrelay.priv.inc \ | ||
${STAGEDIR}/etc/inc/priv | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/pkg/udpbroadcastrelay.xml \ | ||
${STAGEDIR}${PREFIX}/pkg | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/pkg/udpbroadcastrelay/udpbroadcastrelay.inc \ | ||
${STAGEDIR}${PREFIX}/pkg/udpbroadcastrelay | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/www/udpbroadcastrelay.php \ | ||
${STAGEDIR}${PREFIX}/www | ||
${INSTALL_DATA} ${FILESDIR}${PREFIX}/www/udpbroadcastrelay_edit.php \ | ||
${STAGEDIR}${PREFIX}/www | ||
${INSTALL_DATA} ${FILESDIR}${DATADIR}/info.xml \ | ||
${STAGEDIR}${DATADIR} | ||
|
||
@${REINPLACE_CMD} -i '' -e "s|%%PKGVERSION%%|${PKGVERSION}|" \ | ||
${STAGEDIR}${DATADIR}/info.xml | ||
|
||
.include <bsd.port.mk> |
32 changes: 32 additions & 0 deletions
32
net/pfSense-pkg-udpbroadcastrelay/files/etc/inc/priv/udpbroadcastrelay.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,32 @@ | ||
<?php | ||
/* | ||
* udpbroadcastrelay.priv.inc | ||
* | ||
* part of pfSense (https://www.pfsense.org) | ||
* Copyright (c) 2022 Rubicon Communications, LLC (Netgate) | ||
* All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
global $priv_list; | ||
|
||
$priv_list['page-services-udpbroadcastrelay'] = array(); | ||
$priv_list['page-services-udpbroadcastrelay']['name'] = "WebCfg - Services: UDP Broadcast Relay"; | ||
$priv_list['page-services-udpbroadcastrelay']['descr'] = "Access the 'Services: UDP Broadcast Relay' page."; | ||
|
||
$priv_list['page-services-udpbroadcastrelay']['match'] = array(); | ||
$priv_list['page-services-udpbroadcastrelay']['match'][] = "udpbroadcastrelay.php*"; | ||
$priv_list['page-services-udpbroadcastrelay']['match'][] = "udpbroadcastrelay_edit.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 | ||
|
||
${PKG_ROOTDIR}/usr/local/bin/php -f ${PKG_ROOTDIR}/etc/rc.packages %%PORTNAME%% ${2} |
59 changes: 59 additions & 0 deletions
59
net/pfSense-pkg-udpbroadcastrelay/files/usr/local/pkg/udpbroadcastrelay.xml
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,59 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd"> | ||
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?> | ||
<packagegui> | ||
<copyright> | ||
<![CDATA[ | ||
/* | ||
* udpbroadcastrelay.xml | ||
* | ||
* part of pfSense (https://www.pfsense.org) | ||
* Copyright (c) 2022 Rubicon Communications, LLC (Netgate) | ||
* All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
]]> | ||
</copyright> | ||
<name>udpbroadcastrelay</name> | ||
<version>%%PKGVERSION%%</version> | ||
<title>Services/UDP Broadcast Relay</title> | ||
<include_file>/usr/local/pkg/udpbroadcastrelay/udpbroadcastrelay.inc</include_file> | ||
<menu> | ||
<name>UDP Broadcast Relay</name> | ||
<section>Services</section> | ||
<url>/udpbroadcastrelay.php</url> | ||
</menu> | ||
<service> | ||
<name>udpbroadcastrelay</name> | ||
<rcfile>udpbroadcastrelay.sh</rcfile> | ||
<executable>udpbroadcastrelay</executable> | ||
<description>UDP Broadcast Relay</description> | ||
<starts_on_sync></starts_on_sync> | ||
</service> | ||
<plugins> | ||
<item> | ||
<type>plugin_carp</type> | ||
</item> | ||
</plugins> | ||
<custom_php_resync_config_command> | ||
<![CDATA[ | ||
udpbr_resync(); | ||
]]> | ||
</custom_php_resync_config_command> | ||
<custom_php_pre_deinstall_command> | ||
<![CDATA[ | ||
udpbr_deinstall(); | ||
]]> | ||
</custom_php_pre_deinstall_command> | ||
</packagegui> |
Oops, something went wrong.