aboutsummaryrefslogtreecommitdiff
path: root/net/vnstat
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2018-11-22 14:12:49 +0000
committerMark Felder <feld@FreeBSD.org>2018-11-22 14:12:49 +0000
commiteab817386b2a4c103b0ee4a601010c6b31de1c4d (patch)
tree61341cb6c9d044205f8aea707d79343d182e8012 /net/vnstat
parent36acdd9f3a0e89bcf67aee67a603345af42973a4 (diff)
downloadports-eab817386b2a4c103b0ee4a601010c6b31de1c4d.tar.gz
ports-eab817386b2a4c103b0ee4a601010c6b31de1c4d.zip
Notes
Diffstat (limited to 'net/vnstat')
-rw-r--r--net/vnstat/Makefile2
-rw-r--r--net/vnstat/files/vnstat.in26
2 files changed, 2 insertions, 26 deletions
diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile
index 000fbf5bc658..a5578205ca8f 100644
--- a/net/vnstat/Makefile
+++ b/net/vnstat/Makefile
@@ -3,7 +3,7 @@
PORTNAME= vnstat
PORTVERSION= 2.0
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= https://humdi.net/vnstat/ \
https://source.ipfire.org/source-2.x/
diff --git a/net/vnstat/files/vnstat.in b/net/vnstat/files/vnstat.in
index 118db4eccfe2..f0282fa86ca3 100644
--- a/net/vnstat/files/vnstat.in
+++ b/net/vnstat/files/vnstat.in
@@ -9,7 +9,6 @@
# Add the following line to /etc/rc.conf to enable vnstat:
#
# vnstat_enable="YES"
-# vnstat_additional_ifaces="em1"
. /etc/rc.subr
@@ -20,7 +19,7 @@ load_rc_config $name
: ${vnstat_enable:=NO}
: ${vnstat_pidfile=/var/run/vnstat/vnstat.pid}
: ${vnstat_config=%%PREFIX%%/etc/vnstat.conf}
-: ${vnstat_flags="-d --noadd"}
+: ${vnstat_flags="-d"}
: ${vnstat_user:=%%USERS%%}
: ${vnstat_group:=%%GROUPS%%}
@@ -31,19 +30,8 @@ user_cmd="%%PREFIX%%/bin/vnstat"
start_precmd=vnstat_startprecmd
-create_iface_database()
-{
- local iface="$1"
- local descr="$2"
- su -m ${vnstat_user} -c "${user_cmd} --add --iface $iface" >/dev/null 2>&1 ||
- ! echo "$name: Failed to add database for the $descr interface $iface" || return 1
- echo "$name: Created the database for the $descr interface $iface"
-}
-
vnstat_startprecmd()
{
- local dbdir iface
-
if [ ! -e ${pidfile%/*} ]; then
install -d -o ${vnstat_user} -g ${vnstat_group} ${pidfile%/*};
fi
@@ -53,18 +41,6 @@ vnstat_startprecmd()
install -d -o ${vnstat_user} -g ${vnstat_group} ${dbdir};
fi
- iface=$(grep "^Interface" ${vnstat_config} | head -1 | awk 'BEGIN{FS="\042"}{print $2}')
- if [ -n "${iface}" -a ! -f ${dbdir}/${iface} ]; then
- create_iface_database $iface "default" || return 1
- fi
- if [ -n "${vnstat_additional_ifaces}" ]; then
- for iface in ${vnstat_additional_ifaces}; do
- if [ ! -f ${dbdir}/${iface} ]; then
- create_iface_database $iface "additional" || return 1
- fi
- done
- fi
-
if [ ! -d "/var/run/vnstat" ]; then
install -d -o ${vnstat_user} -g ${vnstat_group} /var/run/vnstat;
fi