This How-to will give you a handout to install CCcam php webinfo tool by Toogoody on you're debian linux server.
If you followed the above how-to, there is allready an apache2 server up and running on you're server. All we have to do is make some small modifications to get it ready to run the PHP webinfo tool.
Log into you're linux server with putty so we can change the owner of the webroot directory and enable you to upload files to it.
You need to replace <username> with the username you created during the installation
chmod 775 /var/www chown <username> /var/www
Now you can use an FTP program to upload the content of the cccamphpinfo.zip to /var/www
Once you've done this, you can use putty again to edit config.php and the default apache2 config so the right index file will be accessed when you use explorer.
You can remove these 2 lines
$CCCamWebInfo = array("localhost","12345","user","pass"); // for CCcam webinterface with user and pass $CCCamWebInfo = array("localhost","12345"); // for CCcam webinterface with different port than default and without user and pass
and edit this line
$work_path = "/tmp/"
Once you have done this, the webinfo tool is allready working however it will not be the default page when you open the homepage of you're linux server in mozilla or internet explorer. When you try it, all you will see is a big text stating
To change this we have to change the following:
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place RedirectMatch ^/$ /apache2-default/ </Directory>
When you restart apache (/etc/init.d/apache2 start|stop|reload|restart|configtest), it's default starting page will now be the cccam webinfo tool.
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory>
With the latest ccamPHPinfo tools, you can add cronjobs to refresh the statistics on an hourly base.
This can be done by adding 2 cronjobs.
and add these 2 lines
this will refresh the online page every 2 minutes past the hour.
It will also ping all you're peers every 30 minutes past the hour
Adding Automatic Keyupdate
This script does not work anymore, But you can use it if you have a different URL for the bundle.
As i am kind of lazy, I like my server to download the latest keybundle every hour, compare it to the previous one, and if new keys are available upload them to all my sat recievers. This also put's the latest keys on the server aswel.
I use this script for that.
#!/bin/sh ## Key Distribution to various recievers from 1 single location ## Used to automate further distro Keybundle for CCcam ## Script should be placed in crontab to make sure it runs at regular intervals ## Made by CC_Share ##First let's make some basic definitions. You can change this to you're needs if you want. SATAN="/tmp/satan.tar.gz" ##Location of satan bundle SATANBACK="/tmp/satan.old" ##Location and name of old bundle AUTHFILE1="dbox2" ##Password for Dbox AUTHFILE2="dreambox" ##Password for dreambox DIRECTORY="/var/keys" ##Location of CCcam Keys DBOXIP="22.214.171.124" ##Local IP of DboxII DREAMIP="126.96.36.199" ##Local IP of Dreambox ## These lines should not be changed unless you know what you are doing ## First test if key update is needed date if [ -e /tmp/satan ]; then rm -rf /tmp/satan fi if [ ! -e /var/keys ]; then mkdir /var/keys fi if [ ! -e /var/scce ]; then mkdir /var/scce fi wget http://keyupdater.ascofun.**/satan.tar.gz -O /tmp/satan.tar.gz if [ $SATAN -nt $SATANBACK ] ; then mkdir /tmp/satan tar -xzf /tmp/satan.tar.gz -C /tmp/satan/ rm -rf /var/keys/nagra_roms cd /tmp/satan/var/keys mv -f * /var/keys/ cd /tmp/satan/var/scce mv -f * /var/scce/ cd /tmp rm -rf /tmp/satan/* rm -rf /tmp/satan mv -f /tmp/satan.tar.gz /tmp/satan.old rm -rf /tmp/satan.tar.gz echo "" >>/tmp/key.txt echo "key-update finished." else echo "No new keys available in keybundle" rm -rf /tmp/key.txt fi if [ -e "/tmp/key.txt" ] then ftp -n $DBOXIP <<End-Of-Session user root "$AUTHFILE1" bin hash cd "$DIRECTORY" lcd "$DIRECTORY" put AutoRoll.Key put SoftCam.Key put tps.bin bye End-Of-Session echo "Key update Dbox complete" ftp -n $DREAMIP <<End-Of-Session user root "$AUTHFILE2" bin hash cd "$DIRECTORY" lcd "$DIRECTORY" put AutoRoll.Key put SoftCam.Key put tps.bin bye End-Of-Session echo "Key update Dreambox Complete" else echo "No FTP update needed" fi exit
In this script there are 2 recievers,
1 dreambox and 1 dbox2.
All you need to do is replace
with the right ip adresses
DBOXIP="188.8.131.52" ##Local IP of DboxII DREAMIP="184.108.40.206" ##Local IP of Dreambox
With the valid URL
When you have saved the file, don't forget to make it "executable"
chmod 755 /emu/script/keys.sh
You can simply make a new cronjob to make sure this script is run every hour.
and add this line
00 * * * * root /emu/script/./keys.sh >>/emu/logfiles/keys.log 2>&1
when you restart the cron deamon, the script will run every whole hour.