Thursday, November 6, 2008

Endian community กับปัญหาที่รอคำตอบ?????

1. ต่ออินเทอร์เน็ต 2 line คือ 1. True 2 MB 2. True 1 MB ต้องการให้เส้นทางเดินเป็นดังนี้
1.1 port 8080/80/445 เป็นต้น วิ่งออกที่ 2 MB
1.2 port 25/110 เป็นต้นวิ่งออกทาง 1 MB
-------------------------------------
2. hotspot function ใน Endian community
3. IPcop update http blacklist จะถูก enable ตั้งแต่แรกติดตั้ง ส่วนใน endian จะ update โดยอัตนโนมัติได้อย่างไร ??
คำตอบ

BTW, this was posted to the nabble mail list archives:
#!/bin/sh
# update_blacklists.sh, 20070615
# Mike Tremaine
###################################

###################################
#Set up variables
###################################

dansguardian_start="/etc/init.d/dansguardian start"
dansguardian_stop="/etc/init.d/dansguardian stop"
dansguardian_conf="/etc/dansguardian/"
httpget="/usr/bin/curl"
tarpath="/bin/tar"
workdir="/tmp"
blacklist="http://squidguard.mesd.k12.or.us/blacklists.tgz"

##########################################
#Move to tmp and download
##########################################

cd $workdir
$httpget -O $blacklist || exit 1
$tarpath xzf $workdir/blacklists.tgz -C $workdir || exit 1
#Sanity check file we downloaded
if [ $(stat -c%s "$workdir/blacklist.tgz") -lt 4000001 ]; then
exit 1
fi

###########################################
#Updates lists
############################################

cp -pRf $workdir/blacklists $dansguardian_conf

#Restart
$dansguardian_stop
sleep 3
$dansguardian_start

#Cleanup
rm -f $workdir/blacklists.tgz
rm -r -f $workdir/blacklists

exit 0

http://efwsupport.com/index.php?topic=347.0

0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More