From a05890b38f615976a5b5c5eeeaa9b160f2677193 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 13 May 2021 08:11:13 +0200 Subject: [PATCH] Get latest --- joal/rootfs/run.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/joal/rootfs/run.sh b/joal/rootfs/run.sh index 7cb83dfc5..1873ee247 100644 --- a/joal/rootfs/run.sh +++ b/joal/rootfs/run.sh @@ -23,14 +23,16 @@ sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf declare TOKEN TOKEN=$(bashio::config 'secret_token') -#mv -f /data/joal/config.json / || true +mv -f /data/joal/config.json / || true +#get latest version +curl -s -S -J -L -o /tmp/joal.tar.gz $(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz") >/dev/null #wget -O /tmp/joal.tar.gz "https://github.com/anthonyraymond/joal/releases/download/$UPSTREAM/joal.tar.gz" -#mkdir -p /data/joal -#tar zxvf /tmp/joal.tar.gz -C /data/joal >/dev/null -#chown -R $(id -u):$(id -g) /data/joal -#rm /data/joal/jack-of* -#bashio::log.info "... Joal updated" -#mv -f /config.json /data/joal/ || true +mkdir -p /data/joal +tar zxvf /tmp/joal.tar.gz -C /data/joal >/dev/null +chown -R $(id -u):$(id -g) /data/joal +rm /data/joal/jack-of* +bashio::log.info "... Joal updated" +mv -f /config.json /data/joal/ || true ############### # LAUNCH APPS #