czf4bfu |
Subversion Repositories: |
Rev 16 | Rev 18 | |
---|---|---|
Line 4... | Line 4... | |
# by Unreal][ |
# by Unreal][ | |
# verze 1.6 |
# verze 1.7 | |
# |
# | |
### DATADIR - adresar kam se maj ukladat soubory se zdroji (nejcasteji '/var/www/czf4bfu') |
### DATADIR - adresar kam se maj ukladat soubory se zdroji (nejcasteji '/var/www/czf4bfu') | |
DATADIR='/var/www/www.kobylisy.czf/czf4bfu' |
DATADIR='/var/www/www.kobylisy.czf/czf4bfu' | |
### MYIP - ip adresa nebo DNS zaznam serveru |
### MYIP - ip adresa nebo DNS zaznam serveru | |
MYIP='czf4bfu.kobylisy.czf' |
MYIP='czf4bfu.kobylisy.czf' | |
Line 59... | Line 59... | |
mv ./global-$TMPSVR.txt ./global-$TMPSVR.txt.bckp |
mv ./global-$TMPSVR.txt ./global-$TMPSVR.txt.bckp | |
echo "*** $TMPSVR NEnalezen v servers.list a byl zalohovan ***" |
echo "*** $TMPSVR NEnalezen v servers.list a byl zalohovan ***" | |
fi |
fi | |
fi |
fi | |
done |
done | |
|
||
### mrkneme se po externich ikonkach |
### mrkneme se po externich ikonkach | |
|
| |
OLD_IFS=$IFS; IFS=$'\n' |
OLD_IFS=$IFS; IFS=$'\n' | |
GLOBALS=`ls global-*.txt | sed 's/^global-//' | sed 's/\.txt$//'` |
GLOBALS=`ls global-*.txt | sed 's/^global-//' | sed 's/\.txt$//'` | |
for TMPSVR in $GLOBALS |
for TMPSVR in $GLOBALS | |
do |
do | |
for ICONS in `grep 'ICON:' global-$TMPSVR.txt`; do |
for ICONS in `grep 'ICON:' global-$TMPSVR.txt`; do | |
ICONURL=`echo "$ICONS" | sed -n "s/^ICON: \([[:space:]]+\)\?\([^[:space:]#].*\)/\2/p"` |
ICONURL=`echo "$ICONS" | sed -n "s/^ICON: \([[:space:]]+\)\?\([^[:space:]#].*\)/\2/p"` | |
ICONNAME=`echo "$ICONURL" | sed -n "s/^\(.*\)\/\([^[\/].*\)$/\2/p"` |
ICONNAME=`echo "$ICONURL" | sed -n "s/^\(.*\)\/\([^[\/].*\)$/\2/p"` | |
if [ "$ICONNAME" != "" ]; then |
if [ "$ICONNAME" != "" ]; then | |
if wget -T 3 -t 3 -N -U CZF4BFU $ICONURL -O $DATADIR/cache/"$TMPSVR"_"$ICONNAME" |
if wget -T 3 -t 3 -N -U CZF4BFU $ICONURL | |
then |
then | |
mv $ICONNAME $DATADIR/cache/"$TMPSVR"_"$ICONNAME" | ||
echo "***** podarilo se stahnout ikonku $ICONNAME ze serveru $TMPSVR *****" |
echo "***** podarilo se stahnout ikonku $ICONNAME ze serveru $TMPSVR *****" | |
else |
else | |
PRESKOC=0 |
PRESKOC=0 | |
for SERVER in `cat servers.list` |
for SERVER in `cat servers.list` | |
do |
do | |
if [ $PRESKOC -lt 1 ]; then |
if [ $PRESKOC -lt 1 ]; then | |
if wget -T 3 -t 3 -N -U CZF4BFU http://$SERVER/czf4bfu/cache/"$SERVER"_"$ICONNAME" -O $DATADIR/cache/"$SERVER"_"$ICONNAME" |
if wget -T 3 -t 3 -N -U CZF4BFU http://$SERVER/czf4bfu/cache/"$SERVER"_"$ICONNAME" | |
then |
then | |
mv "$SERVER"_"$ICONNAME" $DATADIR/cache/"$SERVER"_"$ICONNAME" | ||
echo "***** podarilo se stahnout ikonku $ICONNAME ze serveru $SERVER *****" |
echo "***** podarilo se stahnout ikonku $ICONNAME ze serveru $SERVER *****" | |
PRESKOC=1 |
PRESKOC=1 | |
fi |
fi | |
fi |
fi | |
done |
done |