]> # ========================================================================= # Clean up previous files that don't match the known md5 # ========================================================================= # Remove previous temp install directory if found [ -d /tmp/&name;-inst ] && rm -fR /tmp/&name;-inst; # ========================================================================= # Download required plugin files # ========================================================================= echo "App name has changed, downloading new plugin file..." # Check for net connectivity to the repo, 5 second timeout then fails NETCHECK=`timeout 5 wget --no-check-certificate -qST4 --spider "https://github.com/PhAzE-Variance" 2>&1 | grep HTTP | tail -1 | cut -f1 | awk '{print $NF}'` if [ "$NETCHECK" == "OK" ]; then HASNET="yes" else HASNET="no" fi # Downloads the new plugin file since the name has changed from its current state mkdir -p /tmp wget --no-check-certificate -qO "/tmp/Embyserver.plg" "https://github.com/PhAzE-Variance/unRAID/raw/master/Plugins/Embyserver.plg" echo "...New plugin file downloaded!" # ============================================== # The 'install' script # ============================================== echo "Installing new plugin file..." if [ -f "/tmp/Embyserver.plg" ]; then /bin/bash -c "/usr/local/sbin/installplg /tmp/Embyserver.plg" sleep 1 ARCHTYPE=$( /usr/bin/uname -m ) if [ "x86_64" != "$ARCHTYPE" ]; then [ ! -f "/boot/config/plugins/Embyserver.plg" ] && mv -f "/tmp/Embyserver.plg" "/boot/config/plugins/Embyserver.plg" fi fi rm -f "/tmp/&name;-script" kill -9 `ps --pid $$ -oppid=`; exit