mirror of https://github.com/tteck/Proxmox.git
				
				
				
			
							parent
							
								
									5ed048c9fa
								
							
						
					
					
						commit
						7babad2098
					
				| 
						 | 
					@ -55,19 +55,20 @@ function default_settings() {
 | 
				
			||||||
function update_script() {
 | 
					function update_script() {
 | 
				
			||||||
header_info
 | 
					header_info
 | 
				
			||||||
if [[ ! -f /etc/systemd/system/jackett.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
					if [[ ! -f /etc/systemd/system/jackett.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"
 | 
					 | 
				
			||||||
msg_info "Updating ${APP}"
 | 
					 | 
				
			||||||
RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
					RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
 | 
				
			||||||
wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz
 | 
					if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
 | 
				
			||||||
systemctl stop jackett
 | 
					  msg_info "Updating ${APP}"
 | 
				
			||||||
rm -rf /opt/Jackett
 | 
					  wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz
 | 
				
			||||||
tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt
 | 
					  systemctl stop jackett
 | 
				
			||||||
rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz
 | 
					  rm -rf /opt/Jackett
 | 
				
			||||||
systemctl start jackett
 | 
					  tar -xzf Jackett.Binaries.LinuxAMDx64.tar.gz -C /opt
 | 
				
			||||||
msg_ok "Updated ${APP} to ${RELEASE}"
 | 
					  rm -rf Jackett.Binaries.LinuxAMDx64.tar.gz
 | 
				
			||||||
 | 
					  systemctl start jackett
 | 
				
			||||||
 | 
					  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
				
			||||||
 | 
					  msg_ok "Updated ${APP} to ${RELEASE}"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
exit
 | 
					exit
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue