diff options
author | scrappy <scrappy@FreeBSD.org> | 2007-04-29 03:12:31 +0800 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 2007-04-29 03:12:31 +0800 |
commit | 2c3513c52e256e5b7a4e42d0ebc2119645e6585a (patch) | |
tree | cd777f88a018a6e94fa2168c0ee9cf489cc93e8a /sysutils/bsdstats | |
parent | 03aae6051d21494b740cac7a41bcbd5398534478 (diff) | |
download | freebsd-ports-gnome-2c3513c52e256e5b7a4e42d0ebc2119645e6585a.tar.gz freebsd-ports-gnome-2c3513c52e256e5b7a4e42d0ebc2119645e6585a.tar.zst freebsd-ports-gnome-2c3513c52e256e5b7a4e42d0ebc2119645e6585a.zip |
By popular request, I've added a bsdstats.sh script to etc/rc.d so that
it can be enabled to run on reboot (ie. for laptops, office computers, etc)
since not everyone runs a server 24/7 ...
I've added to pkg-install a yesno question as to whether it should be enabled
on reboot, seperate from the monthly periodic run ...
Diffstat (limited to 'sysutils/bsdstats')
-rw-r--r-- | sysutils/bsdstats/Makefile | 6 | ||||
-rw-r--r-- | sysutils/bsdstats/pkg-install | 11 |
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 |