mirror of https://github.com/tteck/Proxmox.git
parent
cabfa3ba2f
commit
99f50a5bc2
|
@ -54,22 +54,21 @@ function default_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
if [[ ! -f /etc/systemd/system/flaresolverr.service ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
header_info
|
header_info
|
||||||
msg_info "Updating $APP LXC"
|
if [[ ! -f /etc/systemd/system/flaresolverr.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
systemctl stop flaresolverr
|
|
||||||
|
|
||||||
# install flaresolverr
|
|
||||||
RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
wget -q https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz
|
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||||
tar -xzf flaresolverr_linux_x64.tar.gz -C /opt
|
msg_info "Updating $APP LXC"
|
||||||
rm flaresolverr_linux_x64.tar.gz
|
systemctl stop flaresolverr
|
||||||
|
wget -q https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz
|
||||||
systemctl start flaresolverr
|
tar -xzf flaresolverr_linux_x64.tar.gz -C /opt
|
||||||
msg_ok "Updated $APP LXC"
|
rm flaresolverr_linux_x64.tar.gz
|
||||||
|
systemctl start flaresolverr
|
||||||
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
msg_ok "Updated $APP LXC"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue