Compare commits

..

2 Commits

Author SHA1 Message Date
Håvard Gjøby Thom 8cc9b6d69b
Merge a096b53783 into eceb52a67a 2024-10-29 15:52:15 +01:00
Håvard Thom a096b53783 Add new LXC: NZBGet 2024-10-28 22:36:15 +01:00
3 changed files with 29 additions and 17 deletions

View File

@ -1,10 +1,3 @@
<div style="border: 2px solid #d1d5db; padding: 20px; border-radius: 8px; background-color: #f9fafb;">
<h2 align="center">Proxmox VE Helper-Scripts Project Update</h2>
<p>Dear Community,</p>
<p>I wanted to share a personal update. Ive recently transitioned into hospice care and, as a result, will be slowing down the development of this project. While Im grateful for the progress weve made together, I recognize that Ill be taking a step back for some rest and reflection during this time.</p>
<p>Thank you for your continued support, encouragement, and understanding. Your dedication to the community and this project means the world to me, and I am grateful for each of you.</p>
<p>Warm regards,<br>tteck/tteckster</p>
</div>
<div align="center">
<a href="#">
<img src="https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/logo.png" height="100px" />

View File

@ -56,10 +56,27 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -f /lib/systemd/system/nzbget.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated $APP LXC"
RELEASE=$(curl -s https://api.github.com/repos/nzbgetcom/nzbget/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping ${APP}"
systemctl stop nzbget
msg_ok "Stopped ${APP}"
msg_info "Updating ${APP} to ${RELEASE}"
wget -q https://github.com/nzbgetcom/nzbget/releases/download/v$RELEASE/nzbget-$RELEASE-amd64.deb
dpkg -i nzbget-${RELEASE}-amd64.deb &>/dev/null
rm -rf nzbget-${RELEASE}-amd64.deb
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting ${APP}"
systemctl start nzbget
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}

View File

@ -18,8 +18,8 @@ msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y gpg
$STD apt-get install -y par2
$STD apt-get install -y p7zip-full
cat <<EOF >/etc/apt/sources.list.d/non-free.list
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
EOF
@ -29,11 +29,13 @@ rm /etc/apt/sources.list.d/non-free.list
msg_ok "Installed Dependencies"
msg_info "Installing NZBGet"
mkdir -p /etc/apt/keyrings
curl -fsSL https://nzbgetcom.github.io/nzbgetcom.asc | gpg --dearmor -o /etc/apt/keyrings/nzbgetcom.gpg
echo "deb [signed-by=/etc/apt/keyrings/nzbgetcom.gpg] https://nzbgetcom.github.io/deb stable main" >/etc/apt/sources.list.d/nzbgetcom.list
$STD apt-get update
$STD apt-get install -y nzbget
RELEASE=$(curl -s https://api.github.com/repos/nzbgetcom/nzbget/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q https://github.com/nzbgetcom/nzbget/releases/download/v$RELEASE/nzbget-$RELEASE-amd64.deb
$STD dpkg -i nzbget-${RELEASE}-amd64.deb
sed -i 's/SevenZipCmd=7zz/SevenZipCmd=7z/g' /var/lib/nzbget/nzbget.conf
systemctl restart nzbget
rm -rf nzbget-${RELEASE}-amd64.deb
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed NZBGet"
motd_ssh