#!/bin/ash AppFile=`basename $0` AppDir=`echo $0 | sed -e 's|/'$AppFile'||g'` $AppDir/napi_on "$5" & sleep 10 if [ "$2" = "1" ] then LD_PRELOAD=$AppDir/../lib/libssl.so.0.9.8:$AppDir/../lib/libcrypto.so.0.9.8 $AppDir/wget "http://www.bank-ua.com/export/currrate.xml" -T 60 -O "/tmp/cb.xml" fi if [ "$3" = "1" ] then LD_PRELOAD=$AppDir/../lib/libssl.so.0.9.8:$AppDir/../lib/libcrypto.so.0.9.8 $AppDir/wget "$8" -T 60 -O "/tmp/meteo.xml" fi if [ "$4" = "1" ] then LD_PRELOAD=$AppDir/../lib/libssl.so.0.9.8:$AppDir/../lib/libcrypto.so.0.9.8 $AppDir/wget "http://www.hyrax.ru/cgi-bin/bn_xml5.cgi" -T 60 -O "/tmp/horo.xml" fi if [ "$1" = "1" ] then LD_PRELOAD=$AppDir/../lib/libssl.so.0.9.8:$AppDir/../lib/libcrypto.so.0.9.8 $AppDir/wget "http://k.img.com.ua/rss/ru/news.xml" -T 60 -O "/tmp/news.xml" fi kill `pidof napi_on` var1=' cs 1 0 65535' var2=' 65535 01 monternet05 cs 1 1 1' echo '' > /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo '' > /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml if [ -f "/tmp/news.xml" ] then sed '//,/<\/fulltext>/d' "/tmp/news.xml" > "/tmp/news.tmp" mv "/tmp/news.tmp" "/tmp/news.xml" echo "$var1" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "01" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "00000001" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "Последние новости Украины и мира." >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "Корреспондент.net - информационно-новостной портал №1 в Украине. `sed '22q;d' "/tmp/news.xml" | sed 's/^ *//;s/<\/pubDate>/<\/summary>/'`" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "http://korrespondent.net/" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml count=24 until [ "`sed $count"q;d" "/tmp/news.xml"`" = "" ] do echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000001" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed `let $count-5`'q;d' "/tmp/news.xml" | sed 's///' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed `let $count-4`'q;d' "/tmp/news.xml" | sed 's///;s//<\/summary>/' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed $count'q;d' "/tmp/news.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml count=`let $count+10` done rm "/tmp/news.xml" fi if [ -f "/tmp/cb.xml" ] then echo "$var1" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "02" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "00000002" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "Курсы валют" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml grep -B2 "USD" "/tmp/cb.xml" | sed 's//\Н\а /;s/<\/date>/<\/summary>/;q' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "http://www.bank-ua.com/" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000002" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n '/USD/{n;p;}' "/tmp/cb.xml" | sed "s///;s|</size>|`sed -n '/USD/{n;n;p;}' "/tmp/cb.xml" | sed 's/<name>/ /;s|</name>||;s/ //'`|" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n '/USD/{n;n;n;p;}' "/tmp/cb.xml" | sed 's/rate/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "http://www.bank-ua.com/" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000002" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n '/EUR/{n;p;}' "/tmp/cb.xml" | sed "s///;s|</size>|`sed -n '/EUR/{n;n;p;}' "/tmp/cb.xml" | sed 's/<name>/ /;s|</name>||;s/ //'`|" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n '/EUR/{n;n;n;p;}' "/tmp/cb.xml" | sed 's/rate/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "http://www.bank-ua.com/" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000002" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n /$6/'{n;p;}' "/tmp/cb.xml" | sed "s///;s|</size>|`sed -n /$6/'{n;n;p;}' "/tmp/cb.xml" | sed 's/<name>/ /;s|</name>||;s/ //'`|" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n /$6/'{n;n;n;p;}' "/tmp/cb.xml" | sed 's/rate/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "http://www.bank-ua.com/" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml rm "/tmp/cb.xml" fi if [ -f "/tmp/meteo.xml" ] then sed 's/>\ "/tmp/meteo.tmp" mv "/tmp/meteo.tmp" "/tmp/meteo.xml" echo "$var1" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "03" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "00000003" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "Прогноз Погоды" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml sed '4q;d' "/tmp/meteo.xml" | sed 's/title/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "http://rp5.ru" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000003" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '9q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '11q;d' "/tmp/meteo.xml" | sed 's/description/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '10q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000003" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '16q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '18q;d' "/tmp/meteo.xml" | sed 's/description/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '17q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000003" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '23q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '25q;d' "/tmp/meteo.xml" | sed 's/description/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '24q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000003" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '30q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '32q;d' "/tmp/meteo.xml" | sed 's/description/summary/g' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed '31q;d' "/tmp/meteo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml rm "/tmp/meteo.xml" fi if [ -f "/tmp/horo.xml" ] then echo "$var1" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "04" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "00000004" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "Ежедневный гороскоп от Hyrax.ru" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml sed -n "/http:\/\/www.hyrax.ru\//{n;n;p;q;}" "/tmp/horo.xml" | sed 's//\С\о\с\т\а\в\л\е\н \н\а: /;s/ 00:00:02 +0300//;s/<\/pubDate>/<\/summary>/' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "http://www.hyrax.ru/" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000004" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n "/http:\/\/www.hyrax.ru\/horo.shtml?cur&1&0&0/{g;1!p;};h" "/tmp/horo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n "/http:\/\/www.hyrax.ru\/horo.shtml?cur&1&0&0/{n;p;}" "/tmp/horo.xml" | sed 's///;s/<\/description>//;s/$/<\/summary>/' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "http://www.hyrax.ru/horo.shtml?cur&1&0&0" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "$var2" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "00000004" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n "/http:\/\/www.hyrax.ru\/horo.shtml?cur&1&$7&0/{g;1!p;};h" "/tmp/horo.xml" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml sed -n "/http:\/\/www.hyrax.ru\/horo.shtml?cur&1&$7&0/{n;p;}" "/tmp/horo.xml" | sed 's///;s/<\/description>//;s/$/<\/summary>/' >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "http://www.hyrax.ru/horo.shtml?cur&1&$7&0" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml rm "/tmp/horo.xml" fi echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/entry.xml echo "" >> /ezxlocal/download/appwrite/dynamicidle/di/pluginlib/newsreader/xml/feed.xml