Refactor: Jackett (#6344)

* Refactor

* Update
This commit is contained in:
Slaviša Arežina
2025-07-29 14:52:19 +02:00
committed by GitHub
parent 498723fd62
commit 70cb8198fd
3 changed files with 17 additions and 21 deletions

View File

@@ -13,20 +13,14 @@ setting_up_container
network_check
update_os
msg_info "Installing Jackett"
RELEASE=$(curl -fsSL https://github.com/Jackett/Jackett/releases/latest | grep "title>Release" | cut -d " " -f 4)
cd /opt
curl -fsSL "https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz" -o "Jackett.Binaries.LinuxAMDx64.tar.gz"
tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt
rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Jackett"
fetch_and_deploy_gh_release "jackett" "Jackett/Jackett" "prebuild" "latest" "/opt/Jackett" "Jackett.Binaries.LinuxAMDx64.tar.gz"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/jackett.service
[Unit]
Description=Jackett Daemon
After=network.target
[Service]
SyslogIdentifier=jackett
Restart=always
@@ -35,7 +29,8 @@ Type=simple
WorkingDirectory=/opt/Jackett
ExecStart=/bin/sh /opt/Jackett/jackett_launcher.sh
TimeoutStopSec=30
Environment="DisableRootWarning=true"
EnvironmentFile="/opt/.env"
[Install]
WantedBy=multi-user.target
EOF