Posts by dibun

    I have modified the orginal script.


    #!/bin/sh
    #OSCAM AUTO UPDATE SCRIPT
    #GET THE LATEST VERSION AT

    Code
    http://tekreaders.com/blog/2011/04/11/oscam-version-auto-update-on-dreambox/


    #CONFIGURATION


    # The location of your oscam binary
    OSCAM_BIN="/usr/softcams/oscam";


    # Command to stop the running oscam
    STOP_OSCAM_CMD="/usr/script/oscam_cam.sh stop";


    # Command to start oscam
    START_OSCAM_CMD="/usr/script/oscam_cam.sh start";


    # Use "mips-tuxbox" if you are on mips (enigma2) dreambox (Models: 500HD, 7020HD, 7025, 7025+, 800HD, 800HD SE, 8000. If you want to use with libusb then change
    it to "mips-tuxbox-webif-libusb"
    PLATFORM="mips-tuxbox-webif";


    # Directory. You can find the current directory from the URL.
    DIRECTORY="mips-tuxbox"


    #PROCESS UPDATE
    cd /tmp
    echo "Downloading UMP FileCenter index file...";
    wget -O "ump.tmp" "http://download.oscam.to/index.php?&direction=0&order=mod&directory=$DIRECTORY&"
    echo "Checking for latest revision on UMP...";
    html=$(cat ump.tmp)
    ft="index.php?action=downloadfile&filename=oscam-svn"
    st="-$DIRECTORY-webif-Distribution.tar.gz&directory=$DIRECTORY&amp"
    gt="index.php?action=downloadfile&filename=oscam-svn"
    kt="-$DIRECTORY-webif-Distribution.tar.gz&directory=$DIRECTORY&"
    revision=${html#*$ft}
    revision=${revision%%$st*}
    if (expr "$revision" : '-\?[0-9]\+$' > /dev/null) then
    filename="oscam-svn$revision-$PLATFORM";
    echo "Downloading revision $revision from UMP...";
    wget -O "latest_oscam.tar.gz" "http://download.oscam.to/$gt$revision$kt"
    echo "Extracting Oscam binary for $PLATFORM...";
    tar -xvzf latest_oscam.tar.gz $filename
    if [ -f $filename ]; then
    echo "Stopping currently running Oscam...";
    $STOP_OSCAM_CMD
    echo "Copying the new version to $OSCAM_BIN";
    cp -f $filename $OSCAM_BIN
    echo "Starting Oscam";
    $START_OSCAM_CMD
    echo "Update process completed!";
    else
    echo "Unable to extract latest version from archive. Aborting.";
    fi
    else
    echo "Unable to get latest revision from UMP. Operation Aborted!";
    fi
    echo "Cleaning up temporary files...";
    rm ump.tmp
    rm latest_oscam.tar.gz
    rm $filename
    cd ~
    echo "All done!";