parent
498723fd62
commit
70cb8198fd
@ -27,17 +27,18 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RELEASE=$(curl -fsSL https://github.com/Jackett/Jackett/releases/latest | grep "title>Release" | cut -d " " -f 4)
|
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [ ! -f /opt/.env ]; then
|
||||||
msg_info "Updating ${APP}"
|
sed -i 's|^Environment="DisableRootWarning=true"$|EnvironmentFile="/opt/.env"|' /etc/systemd/system/jackett.service
|
||||||
curl -fsSL "https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz" -o $(basename "https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz")
|
cat <<EOF >/opt/.env
|
||||||
systemctl stop jackett
|
DisableRootWarning=true
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/Jackett/Jackett/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [[ "${RELEASE}" != "$(cat ~/.jackett 2>/dev/null)" ]] || [[ ! -f ~/.jackett ]]; then
|
||||||
rm -rf /opt/Jackett
|
rm -rf /opt/Jackett
|
||||||
tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt
|
fetch_and_deploy_gh_release "jackett" "Jackett/Jackett" "prebuild" "latest" "/opt/Jackett" "Jackett.Binaries.LinuxAMDx64.tar.gz"
|
||||||
rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz
|
|
||||||
systemctl start jackett
|
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
|
||||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
fi
|
fi
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 9117,
|
"interface_port": 9117,
|
||||||
"documentation": "https://github.com/Jackett/Jackett/wiki",
|
"documentation": "https://github.com/Jackett/Jackett/wiki",
|
||||||
"website": "https://github.com/Jackett/Jackett",
|
"website": "https://github.com/Jackett/Jackett",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/jackett.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/jackett.webp",
|
||||||
"config_path": "",
|
"config_path": "/opt/.env",
|
||||||
"description": "Jackett supports a wide range of trackers, including popular ones like The Pirate Bay, RARBG, and Torrentz2, as well as many private trackers. It can be integrated with several BitTorrent clients, including qBittorrent, Deluge, and uTorrent, among others.",
|
"description": "Jackett supports a wide range of trackers, including popular ones like The Pirate Bay, RARBG, and Torrentz2, as well as many private trackers. It can be integrated with several BitTorrent clients, including qBittorrent, Deluge, and uTorrent, among others.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
|
@ -13,20 +13,14 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Jackett"
|
fetch_and_deploy_gh_release "jackett" "Jackett/Jackett" "prebuild" "latest" "/opt/Jackett" "Jackett.Binaries.LinuxAMDx64.tar.gz"
|
||||||
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"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/jackett.service
|
cat <<EOF >/etc/systemd/system/jackett.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Jackett Daemon
|
Description=Jackett Daemon
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
SyslogIdentifier=jackett
|
SyslogIdentifier=jackett
|
||||||
Restart=always
|
Restart=always
|
||||||
@ -35,7 +29,8 @@ Type=simple
|
|||||||
WorkingDirectory=/opt/Jackett
|
WorkingDirectory=/opt/Jackett
|
||||||
ExecStart=/bin/sh /opt/Jackett/jackett_launcher.sh
|
ExecStart=/bin/sh /opt/Jackett/jackett_launcher.sh
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
||||||
Environment="DisableRootWarning=true"
|
EnvironmentFile="/opt/.env"
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user