Skip to content

Commit

Permalink
Fixing manual and auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Hernandez committed Jun 2, 2017
1 parent 2b19a75 commit 13d5004
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 5 additions & 7 deletions docker-containers/base/overlay-common/bin/update
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/bin/bash

EDGE=1

echo "Stopping ${APP_NAME}..."
s6-svc -d /var/run/s6/services/emby-server > /dev/null 2>&1
echo "Updating ${APP_NAME}..."
zypper --quiet --non-interactive ref > /dev/null 2>&1
zypper --quiet --non-interactive up --no-recommends ${PKG_NAME} > /dev/null 2>&1
zypper cc --all
rm -rf /var/cache/zypp*
echo "Starting ${APP_NAME}..."
s6-svc -u /var/run/s6/services/emby-server > /dev/null 2>&1
source /etc/cont-init.d/03-upgrade-onetime
echo "Re-starting ${APP_NAME}..."
s6-svc -u /var/run/s6/services/${APP_NAME} > /dev/null 2>&1
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ STABLE=${STABLE:-1}
if [[ $EDGE -eq 1 ]]; then
echo "Updating ${APP_NAME}..."
if [[ $STABLE -eq 1 ]]; then
RELEASE_VERSION=$(curl -sL https://github.com/mediaBrowser/Emby/releases.atom | grep -A 1 -e 'link.*alternate' | grep -e ' <' | sed 'N;s/\n/ /' | grep -v 'beta' | head -1 | sed 's%.*/tag/\([^"]*\).*%\1%')
VERSION=$(curl -sL https://github.com/mediaBrowser/Emby/releases.atom | grep -A 1 -e 'link.*alternate' | grep -e ' <' | sed 'N;s/\n/ /' | grep -v 'beta' | head -1 | sed 's%.*/tag/\([^"]*\).*%\1%')
else
RELEASE_VERSION=$(curl -sL https://github.com/mediaBrowser/Emby/releases.atom | grep -A 1 -e 'link.*alternate' | grep -e ' <' | sed 'N;s/\n/ /' | grep 'beta' | head -1 | sed 's%.*/tag/\([^"]*\).*%\1%')
VERSION=$(curl -sL https://github.com/mediaBrowser/Emby/releases.atom | grep -A 1 -e 'link.*alternate' | grep -e ' <' | sed 'N;s/\n/ /' | grep 'beta' | head -1 | sed 's%.*/tag/\([^"]*\).*%\1%')
fi
curl -o /var/tmp/emby.zip -L https://github.com/MediaBrowser/Emby/releases/download/${RELEASE_VERSION}/Emby.Mono.zip
mkdir /usr/lib/emby-server/bin
echo "Found version: $VERSION"
curl -o /var/tmp/emby.zip -L https://github.com/MediaBrowser/Emby/releases/download/${VERSION}/Emby.Mono.zip
rm -rf /usr/lib/emby-server/bin
mkdir -p /usr/lib/emby-server/bin
unzip /var/tmp/emby.zip -d /usr/lib/emby-server/bin
source /etc/cont-init.d/04-fix_dllmaps-onetime
rm /var/tmp/emby.zip
fi

0 comments on commit 13d5004

Please sign in to comment.