+ new readme location
+ add rc script With tweaks/advices from jasper@ ok jasper@
This commit is contained in:
parent
c7ab0ff2e4
commit
a692642d0e
@ -1,10 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2010/10/25 10:14:53 pea Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2010/11/08 13:20:44 pea Exp $
|
||||
|
||||
COMMENT = network traffic monitor
|
||||
|
||||
DISTNAME = vnstat-1.10
|
||||
CATEGORIES = net sysutils
|
||||
|
||||
REVISION = 0
|
||||
|
||||
HOMEPAGE = http://humdi.net/vnstat/
|
||||
|
||||
MASTER_SITES = ${HOMEPAGE}
|
||||
@ -31,11 +33,4 @@ LDFLAGS += -L${LOCALBASE}/lib -L/usr/X11R6/lib
|
||||
MAKE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
|
||||
LDFLAGS="${LDFLAGS}"
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/vnstat
|
||||
${SUBST_CMD} -c ${FILESDIR}/README.OpenBSD \
|
||||
${PREFIX}/share/doc/vnstat/README.OpenBSD
|
||||
chown ${SHAREOWN}:${SHAREGRP} \
|
||||
${PREFIX}/share/doc/vnstat/README.OpenBSD
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +0,0 @@
|
||||
Please see ${PREFIX}/share/doc/vnstat/README.OpenBSD for
|
||||
a brief intro to using vnstat on OpenBSD.
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/10/25 10:14:53 pea Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2010/11/08 13:20:44 pea Exp $
|
||||
@newgroup _vnstat:658
|
||||
@newuser _vnstat:658:_vnstat:daemon:vnstat daemon:/var/db/vnstat:/bin/sh
|
||||
@bin bin/vnstat
|
||||
@ -16,8 +16,8 @@
|
||||
@sample
|
||||
@owner
|
||||
@group
|
||||
share/doc/vnstat/
|
||||
share/doc/vnstat/README.OpenBSD
|
||||
share/doc/pkg-readmes/${FULLPKGNAME}
|
||||
share/examples/vnstat/
|
||||
share/examples/vnstat/vnstat.conf
|
||||
@sample ${SYSCONFDIR}/vnstat.conf
|
||||
@rcscript ${RCDIR}/vnstatd
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: README.OpenBSD,v 1.1.1.1 2010/10/25 10:14:53 pea Exp $
|
||||
$OpenBSD: README,v 1.1 2010/11/08 13:20:44 pea Exp $
|
||||
|
||||
All the command must be launched as the user _vnstat.
|
||||
|
||||
@ -11,16 +11,9 @@ This will create the database for the specified interface.
|
||||
3) Edit ${SYSCONFDIR}/vnstat.conf if necessary
|
||||
|
||||
4) Finally launch the vnstatd daemon:
|
||||
# /usr/local/sbin/vnstatd -d
|
||||
# ${SYSCONFDIR}/rc.d/vnstatd start
|
||||
|
||||
5) Add the following to your ${SYSCONFDIR}/rc.local:
|
||||
if [ -x /usr/local/sbin/vnstatd ]; then
|
||||
echo -n ' vnstatd'
|
||||
install -d -o _vnstat /var/run/vnstat
|
||||
su -l _vnstat -c "/usr/local/sbin/vnstatd -d"
|
||||
fi
|
||||
|
||||
6) Create graphics with the command vnstati
|
||||
5) Create graphics with the command vnstati
|
||||
|
||||
|
||||
Random hints:
|
18
net/vnstat/pkg/vnstatd.rc
Normal file
18
net/vnstat/pkg/vnstatd.rc
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: vnstatd.rc,v 1.1 2010/11/08 13:20:44 pea Exp $
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
daemon="${TRUEPREFIX}/sbin/vnstatd"
|
||||
daemon_flags="-d"
|
||||
|
||||
rc_pre() {
|
||||
/usr/bin/install -d -o _vnstat /var/run/vnstat
|
||||
}
|
||||
|
||||
rc_start() {
|
||||
/usr/bin/su -l _vnstat -c "${daemon} ${daemon_flags}" > /dev/null
|
||||
}
|
||||
|
||||
rc_cmd $1
|
Loading…
Reference in New Issue
Block a user