@@ -27,7 +27,7 @@ function update_script() {
2727 msg_error " No ${APP} Installation Found!"
2828 exit
2929 fi
30- RELEASE=$( curl -fsSLX GET " https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk ' /tag_name/{print $4;exit}' FS=' [""]' )
30+ RELEASE=$( curl -fsSL " https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk ' /tag_name/{print $4;exit}' FS=' [""]' )
3131 if [[ " ${RELEASE} " != " $( cat /opt/${APP} _version.txt) " ]] || [[ ! -f /opt/${APP} _version.txt ]]; then
3232 msg_info " Stopping ${APP} "
3333 systemctl stop heimdall
@@ -40,23 +40,23 @@ function update_script() {
4040 msg_ok " Backed up Data"
4141 msg_info " Updating Heimdall Dashboard to ${RELEASE} "
4242 curl -fsSL " https://github.com/linuxserver/Heimdall/archive/${RELEASE} .tar.gz" -o $( basename " https://github.com/linuxserver/Heimdall/archive/${RELEASE} .tar.gz" )
43- tar xzf ${RELEASE} .tar.gz
43+ tar xzf " ${RELEASE} " .tar.gz
4444 VER=$( curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
45- cp -R Heimdall-${VER} /* /opt/Heimdall
46- cd /opt/Heimdall
45+ cp -R Heimdall-" ${VER} " /* /opt/Heimdall
46+ cd /opt/Heimdall || exit
4747 $STD apt-get install -y composer
4848 export COMPOSER_ALLOW_SUPERUSER=1
4949 $STD composer dump-autoload
5050 echo " ${RELEASE} " > /opt/${APP} _version.txt
5151 msg_ok " Updated Heimdall Dashboard to ${RELEASE} "
5252 msg_info " Restoring Data"
53- cd ~
53+ cd ~ || exit
5454 cp -R database-backup/* /opt/Heimdall/database
5555 cp -R public-backup/* /opt/Heimdall/public
5656 sleep 1
5757 msg_ok " Restored Data"
5858 msg_info " Cleanup"
59- rm -rf {${RELEASE} .tar.gz,Heimdall-${VER} ,public-backup,database-backup,Heimdall}
59+ rm -rf {" ${RELEASE} " .tar.gz,Heimdall-" ${VER} " ,public-backup,database-backup,Heimdall}
6060 sleep 1
6161 msg_ok " Cleaned"
6262 msg_info " Starting ${APP} "
0 commit comments