#!/bin/sh
./header_home

echo "<table width='100%'><tr><td class='headline_content'>Willkommen im WEB-Interface des 1018<hr></td></tr>"
echo "<tr><td align='center'>"
echo "<img src='../img/webif.jpg'><br>"
echo "<tr><td class='content'>"
echo "<br>"
echo "Es wird ausdrcklich darauf hingewiesen, dass das entschlsseln von PAY-TV Sender ohne gltiges Abo"
echo "illegal ist. Alles hier Mgliche dient ausschliesslich zu Testzwecken. Sollte es hierbei zu"
echo "irgendwelchen Schden jeglicher Art kommen oder entstehen, so ist der Benutzer selbst verantwortlich."
echo "Es wird keinerlei Garantie, Gewhrleistung oder hnliches bernommen."
echo "Achtung! Das verndern der Originalsoftware fhrt zu Garantierverlust!"
echo "<br/><br/><br>"

EMU='es ist kein Emu aktiv  <img src='../img/stop_kl.png'>'
SERVER='kein Card-Server aktiv  <img src='../img/stop_kl.png'>'

ps -ef|grep camd3 >/tmp/emu.tmp
if [ `grep -ci "/emu/camd3" "/tmp/emu.tmp"` -gt 0 ]; then
  EMU="Camd3 ist aktiv  <img src='../img/ok_kl.png'>"
fi

ps -ef|grep mgcamd_1.35 >/tmp/emu.tmp
if [ `grep -ci "/var/bin/mgcamd_1.35" "/tmp/emu.tmp"` -gt 0 ]; then
  EMU="Mgcamd_1.35 ist aktiv  <img src='../img/ok_kl.png'>"
fi

ps -ef|grep XcamClient >/tmp/emu.tmp
if [ `grep -ci "/var/bin/XcamClient" "/tmp/emu.tmp"` -gt 0 ]; then
  EMU="XcamClient ist aktiv  <img src='../img/ok_kl.png'>"
fi

ps -ef|grep octagon.sh40 >/tmp/emu.tmp
if [ `grep -ci "/var/bin/octagon.sh40" "/tmp/emu.tmp"` -gt 0 ]; then
  EMU="CCcam ist aktiv  <img src='../img/ok_kl.png'>"
fi

ps -ef|grep newcs >/tmp/server.tmp
if [ `grep -ci "/var/bin/newcs" "/tmp/server.tmp"` -gt 0 ]; then
  SERVER="NewCS ist aktiv  <img src='../img/ok_kl.png'>"
fi

ps -ef|grep mpcs >/tmp/server.tmp
if [ `grep -ci "/var/bin/mpcs" "/tmp/server.tmp"` -gt 0 ]; then
  SERVER="MPCS ist aktiv  <img src='../img/ok_kl.png'>"
fi

echo "<b>Aktueller Camd--Status :</b> $EMU"
echo "<br>"
echo "<b>Aktueller Server-Status :</b> $SERVER"
echo "<br>"

#echo "</pre></td></tr></table>"
echo "</table>"
cat ../footer
