From be2919e70acb75dca22ff185c1f55cab26b2a7a2 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 20 May 2021 23:38:39 +0200 Subject: [PATCH] Symlink code update --- joal/rootfs/run.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/joal/rootfs/run.sh b/joal/rootfs/run.sh index 0730605b5..1745c8982 100644 --- a/joal/rootfs/run.sh +++ b/joal/rootfs/run.sh @@ -75,6 +75,7 @@ fi # download latest version +rn if [ $VERBOSE = true ]; then curl -J -L -o /tmp/joal.tar.gz $(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz") #wget -O /tmp/joal.tar.gz "https://github.com/anthonyraymond/joal/releases/download/$UPSTREAM/joal.tar.gz" @@ -92,14 +93,16 @@ bashio::log.info "Joal updated" # SYMLINK CONFIG # ################## +# If config doesn't exist, create it if [ ! -f /config/joal/config.json ]; then bashio::log.info "Symlinking config files" - touch /data/joal/config.json mkdir -p /config/joal - touch /config/joal/config.json - ln -s /config/joal/config.json /data/joal/config.json + cp /data/joal/config.json /config/joal/config.json fi +# Refresh symlink +ln -sf /config/joal/config.json /data/joal/config.json + ############### # LAUNCH APPS # ###############