#!/bin/sh cd `dirname $0` mkdir -p temp cd temp wget http://update.cz88.net/ip/copywrite.rar wget http://update.cz88.net/ip/qqwry.rar cat > unlock.php < EOF php unlock.php file_size=`du qqwry.dat | awk '{print $1}'` if [ $file_size = "0" ]; then echo "qqwry.dat update fail." exit fi cd .. cp -f temp/qqwry.dat qqwry.dat rm -rf temp/ echo "qqwry.dat update complete."