diff options
Diffstat (limited to 'net/vnstat')
-rw-r--r-- | net/vnstat/files/patch-Makefile | 12 | ||||
-rw-r--r-- | net/vnstat/files/pkg-message.in | 3 | ||||
-rw-r--r-- | net/vnstat/pkg-plist | 5 |
3 files changed, 11 insertions, 9 deletions
diff --git a/net/vnstat/files/patch-Makefile b/net/vnstat/files/patch-Makefile index cf7114689737..8e8f1dfe9298 100644 --- a/net/vnstat/files/patch-Makefile +++ b/net/vnstat/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig 2008-02-03 19:23:03.000000000 +0100 -+++ Makefile 2008-02-19 18:02:58.000000000 +0100 +--- Makefile.orig 2008-02-03 13:23:03.000000000 -0500 ++++ Makefile 2008-02-21 19:51:31.000000000 -0500 @@ -1,106 +1,29 @@ -# bin, man and cron dirs -BIN = $(DESTDIR)/usr/bin @@ -93,9 +93,9 @@ - @if [ `grep -c vnstat /etc/crontab` -eq 0 ]; \ - then cat cron/vnstat >>/etc/crontab; \ - sed -i "" -e 's/lib\/vnstat/db\/vnstat/g' -e 's/\/usr\/bin\/vnstat/\/usr\/local\/bin\/vnstat/g' /etc/crontab; \ -+ @if [ ! -f ${PREFIX}/etc/vnstat.conf ]; \ -+ then install -m 644 cfg/vnstat.conf ${PREFIX}/etc; \ -+ sed -i "" -e 's/lib/db/g' ${PREFIX}/etc/vnstat.conf; \ ++ @if [ ! -f ${PREFIX}/etc/vnstat.conf.sample ]; \ ++ then install -m 644 cfg/vnstat.conf ${PREFIX}/etc/vnstat.conf.sample; \ ++ sed -i "" -e 's/lib/db/g' ${PREFIX}/etc/vnstat.conf.sample; \ fi # update man page @@ -120,4 +120,4 @@ - @echo "The cron entry from /etc/crontab needs to be removed manually." + rm -f ${PREFIX}/bin/vnstat + rm -f ${PREFIX}/man/man1/vnstat.1* -+ rm -f ${PREFIX}/etc/vnstat.conf ++ rm -f ${PREFIX}/etc/vnstat.conf.sample diff --git a/net/vnstat/files/pkg-message.in b/net/vnstat/files/pkg-message.in index 29c7a6a2509c..5d6672aa9a37 100644 --- a/net/vnstat/files/pkg-message.in +++ b/net/vnstat/files/pkg-message.in @@ -2,7 +2,8 @@ vnstat has been installed. This port neeeds a cron entry. Please copy the contents of: -%%DOCSDIR%%/vnstat-cron to your crontab. +%%DOCSDIR%%/vnstat-cron to your crontab. A Sample +configuration file has be installed in %%PREFIX%%/etc/ For more information about vnStat use "man vnstat" or visit: http://humdi.net/vnstat/ diff --git a/net/vnstat/pkg-plist b/net/vnstat/pkg-plist index 6471777374a6..d3a32f4d51ef 100644 --- a/net/vnstat/pkg-plist +++ b/net/vnstat/pkg-plist @@ -1,3 +1,4 @@ +@exec mkdir -p /var/db/vnstat bin/vnstat -etc/vnstat.conf -@unexec rm -rf /var/db/vnstat 2>&1 >/dev/null || true +etc/vnstat.conf.sample +@dirrmtry /var/db/vnstat |