mirror of https://github.com/tteck/Proxmox.git
Compare commits
6 Commits
594dc7e19c
...
de9beedd52
Author | SHA1 | Date |
---|---|---|
|
de9beedd52 | |
|
a38c9f84e0 | |
|
2ef0f9f5c6 | |
|
9c0f6b6a0c | |
|
a6e5eefb34 | |
|
a9742f18cd |
|
@ -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
|
||||
}
|
||||
|
|
@ -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
|
Loading…
Reference in New Issue