mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "6d89c2de129de2189ca9d8f5435b5cfb2d6ae8e0" and "4cddfa3b12b1ac9f7b49f6755d5bead378dd8a40" have entirely different histories.
6d89c2de12
...
4cddfa3b12
|
@ -55,21 +55,16 @@ function default_settings() {
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -d /opt/sabnzbd ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -d /opt/sabnzbd ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
msg_info "Updating $APP"
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
|
||||||
msg_info "Updating $APP to ${RELEASE}"
|
|
||||||
systemctl stop sabnzbd.service
|
systemctl stop sabnzbd.service
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null
|
tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null
|
||||||
\cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null
|
\cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null
|
||||||
rm -rf SABnzbd-${RELEASE}
|
rm -rf SABnzbd-${RELEASE}
|
||||||
cd /opt/sabnzbd
|
cd /opt/sabnzbd
|
||||||
python3 -m pip install -r requirements.txt &>/dev/null
|
python3 -m pip install -r requirements.txt &>/dev/null
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
|
||||||
systemctl start sabnzbd.service
|
systemctl start sabnzbd.service
|
||||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
msg_ok "Updated $APP"
|
||||||
else
|
|
||||||
msg_info "No update required. ${APP} is already at ${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ $STD tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/
|
||||||
mv SABnzbd-${RELEASE} /opt/sabnzbd
|
mv SABnzbd-${RELEASE} /opt/sabnzbd
|
||||||
cd /opt/sabnzbd
|
cd /opt/sabnzbd
|
||||||
$STD python3 -m pip install -r requirements.txt
|
$STD python3 -m pip install -r requirements.txt
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
|
||||||
msg_ok "Installed SABnzbd"
|
msg_ok "Installed SABnzbd"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|
Loading…
Reference in New Issue