summaryrefslogtreecommitdiffstats
path: root/network/vnstat
diff options
context:
space:
mode:
Diffstat (limited to 'network/vnstat')
-rw-r--r--network/vnstat/README24
-rw-r--r--network/vnstat/README.SBo21
-rw-r--r--network/vnstat/vnstat.SlackBuild17
-rw-r--r--network/vnstat/vnstat.info6
4 files changed, 38 insertions, 30 deletions
diff --git a/network/vnstat/README b/network/vnstat/README
index 8d2164349a..73cbc51c7a 100644
--- a/network/vnstat/README
+++ b/network/vnstat/README
@@ -8,25 +8,5 @@ so vnStat can be used without root permissions.
This program is open source (GPL) and can be installed in 'single' and
'root' mode.
-Note that you can run vnstat either from cron or as a daemon from /etc/rc.d.
-
-To run vnstat from cron, add the following line to your crontab:
- 0-55/5 * * * * if [[ -x /usr/bin/vnstat && $(ls /var/lib/vnstat/ | wc -l) -ge 1 ]]; then /usr/bin/vnstat -u; fi
-
-To run vnstat from /etc/rc.d:
- chmod +x /etc/rc.d/rc.vnstat
-
-Note that to have vnstat start automatically this way it should be called from
-rc.local (and optionally rc.local_shutdown) like so:
-
- In rc.local:
- # Start vnstat
- if [ -x /etc/rc.d/rc.vnstat ]; then
- /etc/rc.d/rc.vnstat start
- fi
-
- In rc.local_shutdown:
- # Stop vnstat
- if [ -x /etc/rc.d/rc.vnstat ]; then
- /etc/rc.d/rc.vnstat stop
- fi
+Note that you can run vnstat either from cron or as a daemon from
+/etc/rc.d. See README.SBo for post-install configuration.
diff --git a/network/vnstat/README.SBo b/network/vnstat/README.SBo
new file mode 100644
index 0000000000..31fc8fdf3d
--- /dev/null
+++ b/network/vnstat/README.SBo
@@ -0,0 +1,21 @@
+To run vnstat from cron, add the following line to your crontab:
+
+ 0-55/5 * * * * if [[ -x /usr/bin/vnstat && $(ls /var/lib/vnstat/ | wc -l) -ge 1 ]]; then /usr/bin/vnstat -u; fi
+
+To run vnstat from /etc/rc.d:
+ chmod +x /etc/rc.d/rc.vnstat
+
+Note that to have vnstat start automatically this way it should be
+called from rc.local (and optionally rc.local_shutdown) like so:
+
+ In rc.local:
+ # Start vnstat
+ if [ -x /etc/rc.d/rc.vnstat ]; then
+ /etc/rc.d/rc.vnstat start
+ fi
+
+ In rc.local_shutdown:
+ # Stop vnstat
+ if [ -x /etc/rc.d/rc.vnstat ]; then
+ /etc/rc.d/rc.vnstat stop
+ fi
diff --git a/network/vnstat/vnstat.SlackBuild b/network/vnstat/vnstat.SlackBuild
index 074d123540..829a53c1ca 100644
--- a/network/vnstat/vnstat.SlackBuild
+++ b/network/vnstat/vnstat.SlackBuild
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for vnstat
# Copyright 2017-2019 Michiel van Wessem, Manchester, United Kingdom.
-# Copyright 2019 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2019-2024 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,10 +23,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=vnstat
-VERSION=${VERSION:-2.2}
+VERSION=${VERSION:-2.12}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -108,4 +115,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/vnstat/vnstat.info b/network/vnstat/vnstat.info
index 0758865e29..09eb1780d8 100644
--- a/network/vnstat/vnstat.info
+++ b/network/vnstat/vnstat.info
@@ -1,8 +1,8 @@
PRGNAM="vnstat"
-VERSION="2.2"
+VERSION="2.12"
HOMEPAGE="https://humdi.net/vnstat/"
-DOWNLOAD="https://humdi.net/vnstat/vnstat-2.2.tar.gz"
-MD5SUM="dc918bf2b95e477ab049061eba70c9a9"
+DOWNLOAD="https://humdi.net/vnstat/vnstat-2.12.tar.gz"
+MD5SUM="98bab6e04f123cfd9f605c579bce8ae7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""