Index: net-mgmt/nfsen-ng/Makefile =================================================================== --- net-mgmt/nfsen-ng/Makefile (nonexistent) +++ net-mgmt/nfsen-ng/Makefile (working copy) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +PORTNAME= nfsen-ng +PORTVERSION= 0.2 +DISTVERSIONPREFIX= v +CATEGORIES= net-mgmt +PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} + +MAINTAINER= moiseev@mezonplus.ru +COMMENT= Web based frontend for nfdump netflow collector + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= nfdump>=0:net-mgmt/nfdump \ + ${PHP_PKGNAMEPREFIX}pecl-rrd>0:databases/pecl-rrd@${PHP_FLAVOR} + +USES= php:flavors +USE_RC_SUBR= nfsen-ng + +WWWDIR?= ${PREFIX}/www/${PORTNAME} + +NO_BUILD= yes +NO_ARCH= yes + +SUB_FILES= pkg-message + +USE_GITHUB= YES +GH_ACCOUNT= mbolli + +post-patch: + @${REINPLACE_CMD} -e 's|^#!/usr/bin/env php$$|#!${PREFIX}/bin/php|' ${WRKSRC}/backend/cli.php + @${REINPLACE_CMD} -e 's|^#!/usr/bin/php$$|#!${PREFIX}/bin/php|' ${WRKSRC}/backend/listen.php + @${REINPLACE_CMD} -e 's|'/usr/bin/nfdump'|${PREFIX}/bin/nfdump|' ${WRKSRC}/backend/settings/settings.php.dist + +do-install: + ${MKDIR} ${STAGEDIR}${WWWDIR} + cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}${WWWDIR} + ${MKDIR} ${STAGEDIR}${WWWDIR}/backend/datasources/data + cd ${STAGEDIR}${WWWDIR}/backend/settings && \ + ${MV} settings.php.dist settings.php.sample + +.include Property changes on: net-mgmt/nfsen-ng/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: net-mgmt/nfsen-ng/distinfo =================================================================== --- net-mgmt/nfsen-ng/distinfo (nonexistent) +++ net-mgmt/nfsen-ng/distinfo (working copy) @@ -0,0 +1,3 @@ +TIMESTAMP = 1605005187 +SHA256 (mbolli-nfsen-ng-v0.2_GH0.tar.gz) = 0982e2c70d940d8137a7b8c7c6eea350228d5bd433c747986e1826bbf895a5b3 +SIZE (mbolli-nfsen-ng-v0.2_GH0.tar.gz) = 392149 Property changes on: net-mgmt/nfsen-ng/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: net-mgmt/nfsen-ng/files/nfsen-ng.in =================================================================== --- net-mgmt/nfsen-ng/files/nfsen-ng.in (nonexistent) +++ net-mgmt/nfsen-ng/files/nfsen-ng.in (working copy) @@ -0,0 +1,38 @@ +#!/bin/sh + +# PROVIDE: nfsen-ng +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable nfsen-ng: +# nfsen_ng_enable="YES" + +. /etc/rc.subr + +name="nfsen_ng" +rcvar=nfsen_ng_enable + +load_rc_config $name + +: ${nfsen_ng_enable:="NO"} +: ${nfsen_ng_user:="www"} +: ${nfsen_ng_group:="www"} +: ${nfsen_ng_config:="%%WWWDIR%%/backend/settings/settings.php"} + +command_interpreter="%%PREFIX%%/bin/php" +command="%%WWWDIR%%/backend/listen.php" +cli="%%WWWDIR%%/backend/cli.php" + +required_files="${nfsen_ng_config}" +pidfile="%%WWWDIR%%/backend/nfsen-ng.pid" + +start_cmd="cli_cmd" +stop_cmd="cli_cmd" +status_cmd="cli_cmd" + +cli_cmd() +{ + su -m ${nfsen_ng_user} -c "${cli} ${rc_arg}" +} + +run_rc_command "$1" Property changes on: net-mgmt/nfsen-ng/files/nfsen-ng.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: net-mgmt/nfsen-ng/files/pkg-message.in =================================================================== --- net-mgmt/nfsen-ng/files/pkg-message.in (nonexistent) +++ net-mgmt/nfsen-ng/files/pkg-message.in (working copy) @@ -0,0 +1,19 @@ +[ +{ type: install + message: <