PDA

View Full Version : CCcamSkinInfo EČ 1.3



NoMaD
26-10-2010, 03:53 AM
CCcamSkinInfo EČ 1.3


################################# ################################# #############
# #
# CCcamSkinInfo EČ 1.3 #
# #
################################# ################################# #############
#!/bin/sh
# author= AgentSixtynine
# this script will show you the statistics..that are being used by cccam..directly in skin used....like available cards, hops, on/offline servers...
# this script needs to be startet by crond, with an 1 to 5 minute interval, to keep the infos up to date
# !!!attention: cccam telnetinfo is needed. do not use username and password protection for your telnetinfo!!!
# THX to cuuira for building the skinplatform
#DESCRIPTION=This script updates your CCcamSkinInfo
TELNETINFOPORT=16000
SERVERADDRESS="localhost"
echo "CCcamSkinInfo update is started"
echo servers|nc $SERVERADDRESS $TELNETINFOPORT>/tmp/cccamservers.txt
set $(ls -s /tmp/cccamservers.txt)
if [ "$1" = "0" ];
then
echo "err">/tmp/cccam_available_shares.info
echo "err">/tmp/cccam_hop1.info
echo "err">/tmp/cccam_hop2.info
echo "err">/tmp/cccam_hop3.info
echo "err">/tmp/cccam_onlineservers.info
echo "err">/tmp/cccam_offlineservers.info
echo "err">/tmp/cccam_0-cards.info
echo "err">/tmp/cccam_clients.info
echo "error: Update failed. CCcam is not running or bad syntax in CCcam.cfg.
Don't use telnetinfo username and password and check port!!!"
rm /tmp/cccamservers.txt
else
echo shares|nc $SERVERADDRESS $TELNETINFOPORT>/tmp/cccamshares.txt
sed -ne'3p' /tmp/cccamshares.txt|cut -d" " -f3>/tmp/cccam_available_shares.info
grep -c "1 [0-9]" /tmp/cccamshares.txt>/tmp/cccam_hop1.info
grep -c "2 [0-9]" /tmp/cccamshares.txt>/tmp/cccam_hop2.info
grep -c "3 [0-9]" /tmp/cccamshares.txt>/tmp/cccam_hop3.info
cut -d"|" -f"2-3" /tmp/cccamservers.txt|grep -c "|[0-9]">/tmp/cccam_onlineservers.info
cut -d"|" -f"1-3" /tmp/cccamservers.txt|grep "|[a-z,0-9]"|grep -c "| ">/tmp/cccam_offlineservers.info
cut -d"|" -f"2-3,7" /tmp/cccamservers.txt|grep "|[0-9]"|cut -d"|" -f3|grep -c " 0">/tmp/cccam_0-cards.info
echo clients|nc $SERVERADDRESS $TELNETINFOPORT|sed -ne'4p'|cut -d" " -f3>/tmp/cccam_clients.info
rm /tmp/cccamshares.txt /tmp/cccamservers.txt
echo "CCcamSkinInfo has been updated"
fi
exit

Thnx AgentSixtynine