diff options
author | scrappy <scrappy@FreeBSD.org> | 2006-09-29 02:00:04 +0800 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 2006-09-29 02:00:04 +0800 |
commit | 1b5fdccf033d212e5ad0bf985067209d9e5a148a (patch) | |
tree | 9a679d4d4cc6a3e120c89b2620dfc1f17926bdb4 | |
parent | bbbd2fe4299cd41d9668137e1e8ca9cf8d8af303 (diff) | |
download | freebsd-ports-gnome-1b5fdccf033d212e5ad0bf985067209d9e5a148a.tar.gz freebsd-ports-gnome-1b5fdccf033d212e5ad0bf985067209d9e5a148a.tar.zst freebsd-ports-gnome-1b5fdccf033d212e5ad0bf985067209d9e5a148a.zip |
fix the code a bit to allow for setting the checkin_server to something
different ... instructions soon to follow on web site as to how to use
this to use apache to redirect requests through it as a 'light proxy'
-rw-r--r-- | sysutils/bsdstats/Makefile | 2 | ||||
-rw-r--r-- | sysutils/bsdstats/files/300.statistics | 11 | ||||
-rw-r--r-- | sysutils/bsdstats/files/300.statistics.in | 11 |
3 files changed, 13 insertions, 11 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile index 9182a14e551a..b4076107cddd 100644 --- a/sysutils/bsdstats/Makefile +++ b/sysutils/bsdstats/Makefile @@ -6,7 +6,7 @@ # PORTNAME= bsdstats -PORTVERSION= 3.9 +PORTVERSION= 3.10 CATEGORIES= sysutils DISTFILES= diff --git a/sysutils/bsdstats/files/300.statistics b/sysutils/bsdstats/files/300.statistics index 08f1ba55a178..c7ddac39b0f5 100644 --- a/sysutils/bsdstats/files/300.statistics +++ b/sysutils/bsdstats/files/300.statistics @@ -1,6 +1,6 @@ #!/bin/sh - # -# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.22 2006-09-09 16:45:36 scrappy Exp $ +# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/Attic/300.statistics,v 1.23 2006-09-28 18:00:04 scrappy Exp $ # # If there is a global system configuration file, suck it in. @@ -22,7 +22,7 @@ fi oldmask=$(umask) umask 066 -checkin_server="bsdstats.org"; +checkin_server=${monthly_statistics_checkin_server:-"bsdstats.org"} id_token_file='/var/db/bsdstats' PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin @@ -48,7 +48,7 @@ send_devices () { query_string=$query_string`echo \&dev[]=$DRIVER:$DEV:$CLASS` done - do_fetch report_devices.php?key=$KEY$query_string + do_fetch report_devices.php?token=$TOKEN\&key=$KEY$query_string ;; * ) # Not supported @@ -108,6 +108,7 @@ get_id_token () { fi . $id_token_file KEY=$( uri_escape $KEY ) + TOKEN=$( uri_escape $TOKEN ) } # RFC 2396 @@ -149,7 +150,7 @@ case "$monthly_statistics_enable" in ARCH=`/usr/bin/uname -m` OS=`/usr/bin/uname -s` get_id_token - do_fetch report_system.php?key=$KEY\&rel=$REL\&arch=$ARCH\&opsys=$OS + do_fetch report_system.php?token=$TOKEN\&key=$KEY\&rel=$REL\&arch=$ARCH\&opsys=$OS echo "Posting monthly OS statistics to $checkin_server" case "$monthly_statistics_report_devices" in [Yy][Ee][Ss]) @@ -159,7 +160,7 @@ case "$monthly_statistics_enable" in VEN=$( echo $line | cut -d ' ' -f 1 ) DEV=$( uri_escape $( echo $line | cut -d ' ' -f 2- ) ) count=$( sysctl -n hw.ncpu ) - do_fetch report_cpu.php?key=$KEY\&cpus=$count\&vendor=$VEN\&cpu_type=$DEV + do_fetch report_cpu.php?token=$TOKEN\&key=$KEY\&cpus=$count\&vendor=$VEN\&cpu_type=$DEV echo "Posting monthly CPU statistics to $checkin_server" ;; *) diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in index e5811a352b64..149934f82458 100644 --- a/sysutils/bsdstats/files/300.statistics.in +++ b/sysutils/bsdstats/files/300.statistics.in @@ -1,6 +1,6 @@ #!/bin/sh - # -# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.22 2006-09-09 16:45:36 scrappy Exp $ +# $FreeBSD: /tmp/pcvs/ports/sysutils/bsdstats/files/300.statistics.in,v 1.23 2006-09-28 18:00:04 scrappy Exp $ # # If there is a global system configuration file, suck it in. @@ -22,7 +22,7 @@ fi oldmask=$(umask) umask 066 -checkin_server="bsdstats.org"; +checkin_server=${monthly_statistics_checkin_server:-"bsdstats.org"} id_token_file='/var/db/bsdstats' PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin @@ -48,7 +48,7 @@ send_devices () { query_string=$query_string`echo \&dev[]=$DRIVER:$DEV:$CLASS` done - do_fetch report_devices.php?key=$KEY$query_string + do_fetch report_devices.php?token=$TOKEN\&key=$KEY$query_string ;; * ) # Not supported @@ -108,6 +108,7 @@ get_id_token () { fi . $id_token_file KEY=$( uri_escape $KEY ) + TOKEN=$( uri_escape $TOKEN ) } # RFC 2396 @@ -149,7 +150,7 @@ case "$monthly_statistics_enable" in ARCH=`/usr/bin/uname -m` OS=`/usr/bin/uname -s` get_id_token - do_fetch report_system.php?key=$KEY\&rel=$REL\&arch=$ARCH\&opsys=$OS + do_fetch report_system.php?token=$TOKEN\&key=$KEY\&rel=$REL\&arch=$ARCH\&opsys=$OS echo "Posting monthly OS statistics to $checkin_server" case "$monthly_statistics_report_devices" in [Yy][Ee][Ss]) @@ -159,7 +160,7 @@ case "$monthly_statistics_enable" in VEN=$( echo $line | cut -d ' ' -f 1 ) DEV=$( uri_escape $( echo $line | cut -d ' ' -f 2- ) ) count=$( sysctl -n hw.ncpu ) - do_fetch report_cpu.php?key=$KEY\&cpus=$count\&vendor=$VEN\&cpu_type=$DEV + do_fetch report_cpu.php?token=$TOKEN\&key=$KEY\&cpus=$count\&vendor=$VEN\&cpu_type=$DEV echo "Posting monthly CPU statistics to $checkin_server" ;; *) |