aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bsdstats
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2007-04-28 19:12:31 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2007-04-28 19:12:31 +0000
commite4cbc73c1ddff8432f6b044c314030242d5831a1 (patch)
treeb7f4bb6b26206c6f39e63460987e434cdde00d69 /sysutils/bsdstats
parente3dbd47bf1e725dab67805e6039f6353dbe5e1a7 (diff)
downloadports-e4cbc73c1ddff8432f6b044c314030242d5831a1.tar.gz
ports-e4cbc73c1ddff8432f6b044c314030242d5831a1.zip
Notes
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r--sysutils/bsdstats/Makefile6
-rw-r--r--sysutils/bsdstats/pkg-install11
2 files changed, 15 insertions, 2 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile
index ab3f99263cdd..11924b9952fb 100644
--- a/sysutils/bsdstats/Makefile
+++ b/sysutils/bsdstats/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bsdstats
PORTVERSION= 5.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
DISTFILES=
@@ -21,13 +21,15 @@ RUN_DEPENDS= nc:${PORTSDIR}/net/netcat
.endif
NO_BUILD= yes
-PLIST_FILES= etc/periodic/monthly/300.statistics
+PLIST_FILES= etc/periodic/monthly/300.statistics etc/rc.d/bsdstats.sh
PLIST_DIRS= etc/periodic/monthly \
etc/periodic
do-install:
${MKDIR} ${LOCALBASE}/etc/periodic/monthly
${CP} ${FILESDIR}/300.statistics ${LOCALBASE}/etc/periodic/monthly
+ ${CP} ${FILESDIR}/bsdstats.sh ${LOCALBASE}/etc/rc.d
+ ${CHMOD} 0755 ${LOCALBASE}/etc/rc.d/bsdstats.sh
post-install:
${CAT} ${PKGMESSAGE}
.if defined(BATCH) || defined(PACKAGE_BUILDING)
diff --git a/sysutils/bsdstats/pkg-install b/sysutils/bsdstats/pkg-install
index 0d667932620e..487c4a3e51f9 100644
--- a/sysutils/bsdstats/pkg-install
+++ b/sysutils/bsdstats/pkg-install
@@ -62,5 +62,16 @@ if [ ":$2" = ":POST-INSTALL" ]; then
fi
fi
fi
+ if [ -f "/etc/rc.conf" ]; then
+ if [ `grep bsdstats_enable /etc/rc.conf | wc -l` = 0 ]; then
+ if yesno "Would you like to activate reporting on reboot in /etc/rc.conf" n; then
+ echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf
+ fi
+ fi
+ elif [ ! -f "/etc/periodic.conf" ]; then
+ if yesno "Would you like to activate reporting on reboot in /etc/rc.conf" n; then
+ echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf
+ fi
+ fi
fi