aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bsdstats/files/300.statistics
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-09-28 18:00:04 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-09-28 18:00:04 +0000
commitbe64e7e8bb97cfe4ea3438617c9b06d846ca0975 (patch)
tree617cbe08220c85e87df03e2e6fb8dfa8efd6af81 /sysutils/bsdstats/files/300.statistics
parentf90d727edcbd3a2d71098eb5bb4f67126d92e336 (diff)
downloadports-be64e7e8bb97cfe4ea3438617c9b06d846ca0975.tar.gz
ports-be64e7e8bb97cfe4ea3438617c9b06d846ca0975.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'
Notes
Notes: svn path=/head/; revision=174048
Diffstat (limited to 'sysutils/bsdstats/files/300.statistics')
-rw-r--r--sysutils/bsdstats/files/300.statistics11
1 files changed, 6 insertions, 5 deletions
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"
;;
*)