Changeset 4297 in genesis for tools/pencontrl/pen.sh
- Timestamp:
- Apr 14, 2005, 4:04:56 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/pencontrl/pen.sh
r4283 r4297 1 1 #!/bin/sh 2 thisdir=/usr/local/etc/rc.d 3 killall pen 4 /usr/local/bin/pen -b 30 -r -p /var/run/pen.pid -S 3 -O 172.31.255.1:3128 \ 5 `$thisdir/pencontrl.sh` & 2 echo "" > /tmp/proxylist 3 4 get_fetch() { 5 http_proxy="$1:$2" 6 export http_proxy 7 test=`fetch -T 10 -o /dev/null http://www.planet.nl 2>&1` 8 if [ $? = 0 ]; then 9 echo "`echo "$test" |grep kBps | \ 10 sed 's/^.*(//' | awk '{print $1}'` $1" >> /tmp/proxylist 11 fi 12 } 13 14 get_fetch proxy1.wleiden.net 3128 15 get_fetch proxy2.wleiden.net 3128 16 get_fetch proxy3.wleiden.net 3128 17 18 sort -nr /tmp/proxylist > /var/db/proxylist 19 20 kill `cat /var/run/pen.pid` 21 22 /usr/local/bin/pen -b 30 -r -p /var/run/pen.pid -S 3 -O \ 23 172.31.255.1:3128 `cat /var/db/proxylist | awk '{print $2}' | tr "\n" " "`
Note:
See TracChangeset
for help on using the changeset viewer.