mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-03-23 00:05:28 +08:00
Restore version check for updates on container restart
This commit is contained in:
parent
33bcc9ae92
commit
427d934015
@ -17,11 +17,18 @@ fi
|
||||
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
if [[ ! -e /usr/bin/calibre-server ]]; then
|
||||
CALIBRE_RELEASE="$(cat /CALIBRE_RELEASE)"
|
||||
if [ -z ${CALIBRE_RELEASE+x} ]; then
|
||||
CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi
|
||||
|
||||
if [[ ! -e /usr/bin/calibre-server ]] || [[ "${CALIBRE_RELEASE}" != "$(cat /config/.CALIBRE_RELEASE || :)" ]]; then
|
||||
tar xf \
|
||||
/tmp/calibre.txz \
|
||||
-C /app/calibre
|
||||
rm /tmp/calibre.txz
|
||||
echo "Installing Calibre version $(cat /CALIBRE_RELEASE)"
|
||||
/app/calibre/calibre_postinstall
|
||||
echo "${CALIBRE_RELEASE}" > /config/.CALIBRE_RELEASE
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user