Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
enigma2-plugin-extensions-wgetinstaller-mpgz-full / usr / script / wgetinstaller-mpgz-full-oe25.sh
Size: Mime:
#!/bin/sh

SERVICE=wgetinstaller-mpgz-full
SESSIONID=`curl -s -X POST "http://localhost/web/session" | grep -o -E "<e2sessionid>(.*)</e2sessionid>" | sed "s|.*<e2sessionid>\(.*\)</e2sessionid>.*|\1|"` >/dev/null 2>&1
LANGUAGE=$(grep 'config.osd.language' /etc/enigma2/settings | cut -d'=' -f2)

if [ $LANGUAGE = de_DE ]; then
    if [ ! $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mediaportal' | awk '{print $2}' | cut -d':' -f1) ] || [ ! $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mpgz' | awk '{print $2}' | cut -d':' -f1) ] ; then
        while ps -C apt,apt-get,dpkg  >/dev/null; do
            echo "Bitte warten..."
            sleep 10
        done
        curl -X POST "http://localhost/web/message?text=Bitte%20auf%20die%20Neustart%20Nachricht%20warten%20\nMediaPortal%20%2B%20mpgz%20wird%20installiert&type=1&sessionid=$SESSIONID" >/dev/null 2>&1
        echo "Wird installiert"
        wget http://feed.newnigma2.to/mpgz/mpgz-full-installer_dreamos_oe25.sh -O - | /bin/sh
        curl -X POST "http://localhost/web/remotecontrol?command=352&sessionid=$SESSIONID" >/dev/null 2>&1
        curl -X POST "http://localhost/web/message?text=MediaPortal%20%2B%20mpgz%20ist%20installiert\nBitte%20Dreambox%20neustarten&type=1&timeout=10&sessionid=$SESSIONID" >/dev/null 2>&1
        echo "Dreambox neustarten"
        rm /usr/script/$SERVICE.sh
        systemctl stop $SERVICE
        systemctl disable $SERVICE
        systemctl daemon-reload
        systemctl reset-failed
    elif [ $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mediaportal' | awk '{print $2}' | cut -d':' -f1) ] || [ $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mpgz' | awk '{print $2}' | cut -d':' -f1) ] ; then
        curl -X POST "http://localhost/web/message?text=MediaPortal%20oder%20mpgz%20ist%20bereits%20installiert\nVorgang%20abgebrochen&type=1&timeout=10&sessionid=$SESSIONID" >/dev/null 2>&1
        echo "Vorgang abgebrochen"
        rm /usr/script/$SERVICE.sh
        systemctl stop $SERVICE
        systemctl disable $SERVICE
        systemctl daemon-reload
        systemctl reset-failed
    fi
else
    if [ ! $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mediaportal' | awk '{print $2}' | cut -d':' -f1) ] || [ ! $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mpgz' | awk '{print $2}' | cut -d':' -f1) ] ; then
        while ps -C apt,apt-get,dpkg  >/dev/null; do
            echo "please whait..."
            sleep 10
        done
        curl -X POST "http://localhost/web/message?text=Please%20wait%20for%20the%20restart%20message%20\nMediaPortal%20%2B%20mpgz%20will%20be%20installed&type=1&sessionid=$SESSIONID" >/dev/null 2>&1
        echo " will be installed"
        wget http://feed.newnigma2.to/mpgz/mpgz-full-installer_dreamos_oe25.sh -O - | /bin/sh
        curl -X POST "http://localhost/web/remotecontrol?command=352&sessionid=$SESSIONID" >/dev/null 2>&1
        curl -X POST "http://localhost/web/message?text=MediaPortal%20%2B%20mpgz%20is%20installed\nPlease%20restart%20your%20Dreambox&type=1&timeout=10&sessionid=$SESSIONID" >/dev/null 2>&1
        echo "restart your Dreambox"
        rm /usr/script/$SERVICE.sh
        systemctl stop $SERVICE
        systemctl disable $SERVICE
        systemctl daemon-reload
        systemctl reset-failed
    elif [ $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mediaportal' | awk '{print $2}' | cut -d':' -f1) ] || [ $(dpkg -l | grep '^ii' | grep 'enigma2-plugin-extensions-mpgz' | awk '{print $2}' | cut -d':' -f1) ] ; then
        curl -X POST "http://localhost/web/message?text=MediaPortal%20or%20mpgz%20is%20already%20installed\nProcess%20aborded&type=1&timeout=10&sessionid=$SESSIONID" >/dev/null 2>&1
        echo "process abborded"
        rm /usr/script/$SERVICE.sh
        systemctl stop $SERVICE
        systemctl disable $SERVICE
        systemctl daemon-reload
        systemctl reset-failed
    fi
fi

exit 0