Compare commits

...

6 Commits

Author SHA1 Message Date
tteckster de9beedd52
Update heimdall-dashboard.sh
tweak
2024-04-10 07:34:23 -04:00
tteckster a38c9f84e0
Update heimdall-dashboard.sh
fix fat finger
2024-04-10 07:20:01 -04:00
tteckster 2ef0f9f5c6
Rename heimdalldashboard.sh to heimdall-dashboard.sh 2024-04-10 07:13:55 -04:00
tteckster 9c0f6b6a0c
Update and rename heimdalldashboard-install.sh to heimdall-dashboard-install.sh 2024-04-10 07:07:48 -04:00
tteckster a6e5eefb34
Update heimdalldashboard.sh
tweak
2024-04-10 07:00:25 -04:00
tteckster a9742f18cd
Update heimdalldashboard.sh
tweak update function
2024-04-10 06:56:56 -04:00
2 changed files with 42 additions and 40 deletions

View File

@ -18,7 +18,7 @@ EOF
}
header_info
echo -e "Loading..."
APP="Heimdall Dashboard"
APP="Heimdall-Dashboard"
var_disk="2"
var_cpu="1"
var_ram="512"
@ -55,6 +55,8 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
msg_info "Stopping ${APP}"
systemctl stop heimdall
sleep 1
@ -66,7 +68,6 @@ cp -R /opt/Heimdall/public public-backup
sleep 1
msg_ok "Backed up Data"
RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
msg_info "Updating Heimdall Dashboard to ${RELEASE}"
wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz
tar xzf ${RELEASE}.tar.gz
@ -75,6 +76,7 @@ cp -R Heimdall-${VER}/* /opt/Heimdall
cd /opt/Heimdall
apt-get install -y composer &>/dev/null
COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
msg_info "Restoring Data"
@ -85,11 +87,7 @@ sleep 1
msg_ok "Restored Data"
msg_info "Cleanup"
rm -rf ${RELEASE}.tar.gz
rm -rf Heimdall-${VER}
rm -rf public-backup
rm -rf database-backup
rm -rf Heimdall
rm -rf {${RELEASE}.tar.gz,Heimdall-${VER},public-backup,database-backup,Heimdall}
sleep 1
msg_ok "Cleaned"
@ -98,6 +96,9 @@ systemctl start heimdall.service
sleep 2
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}."
fi
exit
}

View File

@ -23,6 +23,7 @@ $STD apt-get install -y php8.2-{bz2,curl,sqlite3,zip,xml}
msg_ok "Installed Dependencies"
RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_info "Installing Heimdall Dashboard ${RELEASE}"
wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz
tar xzf ${RELEASE}.tar.gz