mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	@@ -27,7 +27,30 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  msg_error "Currently we don't provide an update function for this ${APP}."
 | 
			
		||||
  
 | 
			
		||||
  RELEASE=$(curl -fsSL "https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" | grep -o 'https://.*\.zip')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.agentdvr 2>/dev/null)" ]] || [[ ! -f ~/.agentdvr ]]; then
 | 
			
		||||
    msg_info "Stopping service"
 | 
			
		||||
    systemctl stop AgentDVR
 | 
			
		||||
    msg_ok "Service stopped"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating $APP"
 | 
			
		||||
    cd /opt/agentdvr/agent
 | 
			
		||||
    curl -fsSL "$RELEASE" -o $(basename "$RELEASE")
 | 
			
		||||
    $STD unzip -o Agent_Linux64*.zip
 | 
			
		||||
    chmod +x ./Agent
 | 
			
		||||
    echo $RELEASE > ~/.agentdvr
 | 
			
		||||
    rm -rf Agent_Linux64*.zip
 | 
			
		||||
    msg_ok "Updated $APP"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting service"
 | 
			
		||||
    systemctl start AgentDVR
 | 
			
		||||
    msg_ok "Service started"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Updated $APP successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2024-05-02",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": false,
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": true,
 | 
			
		||||
  "interface_port": 8090,
 | 
			
		||||
  "documentation": "https://www.ispyconnect.com/docs/agent/about",
 | 
			
		||||
 
 | 
			
		||||
@@ -29,6 +29,7 @@ cd /opt/agentdvr/agent
 | 
			
		||||
curl -fsSL "$RELEASE" -o $(basename "$RELEASE")
 | 
			
		||||
$STD unzip Agent_Linux64*.zip
 | 
			
		||||
chmod +x ./Agent
 | 
			
		||||
echo $RELEASE > ~/.agentdvr
 | 
			
		||||
msg_ok "Installed AgentDVR"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user