mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	Fix: Teddycloud Script (install, clean up & update) (#1652)
* Update teddycloud-install.sh * Update teddycloud.sh
This commit is contained in:
		@@ -36,14 +36,12 @@ function update_script() {
 | 
				
			|||||||
    msg_ok "Stopped ${APP}"
 | 
					    msg_ok "Stopped ${APP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    msg_info "Updating ${APP} to v${VERSION}"
 | 
					    msg_info "Updating ${APP} to v${VERSION}"
 | 
				
			||||||
    PREVIOUS_VERSION="$(readlink -f /opt/teddycloud)"
 | 
					    cd /opt
 | 
				
			||||||
 | 
					    mv /opt/teddycloud /opt_teddycloud_bak
 | 
				
			||||||
    wget -q "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip"
 | 
					    wget -q "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip"
 | 
				
			||||||
    unzip -q -d "/opt/teddycloud-${VERSION}" "teddycloud.amd64.release_v${VERSION}.zip"
 | 
					    unzip -q -d /opt/teddycloud teddycloud.amd64.release_v${VERSION}.zip
 | 
				
			||||||
    ln -fns "/opt/teddycloud-${VERSION}" /opt/teddycloud
 | 
					    cp -R /opt_teddycloud_bak/certs /opt_teddycloud_bak/config /opt_teddycloud_bak/data /opt/teddycloud
 | 
				
			||||||
    echo "${VERSION}" >"/opt/${APP}_version.txt"
 | 
					    echo "${VERSION}" >"/opt/${APP}_version.txt"
 | 
				
			||||||
    cp -R "${PREVIOUS_VERSION}/certs" /opt/teddycloud
 | 
					 | 
				
			||||||
    cp -R "${PREVIOUS_VERSION}/config" /opt/teddycloud
 | 
					 | 
				
			||||||
    cp -R "${PREVIOUS_VERSION}/data" /opt/teddycloud
 | 
					 | 
				
			||||||
    msg_ok "Updated ${APP} to v${VERSION}"
 | 
					    msg_ok "Updated ${APP} to v${VERSION}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    msg_info "Starting ${APP}"
 | 
					    msg_info "Starting ${APP}"
 | 
				
			||||||
@@ -51,8 +49,8 @@ function update_script() {
 | 
				
			|||||||
    msg_ok "Started ${APP}"
 | 
					    msg_ok "Started ${APP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    msg_info "Cleaning up"
 | 
					    msg_info "Cleaning up"
 | 
				
			||||||
    rm "teddycloud.amd64.release_v${VERSION}.zip"
 | 
					    rm -rf /opt/teddycloud.amd64.release_v${VERSION}.zip
 | 
				
			||||||
    rm -rf "${PREVIOUS_VERSION}"
 | 
					    rm -rf /opt/teddycloud_bak
 | 
				
			||||||
    msg_ok "Cleaned"
 | 
					    msg_ok "Cleaned"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    msg_ok "No update required. ${APP} is already at v${VERSION}"
 | 
					    msg_ok "No update required. ${APP} is already at v${VERSION}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,6 +30,7 @@ VERSION="${RELEASE#tc_v}"
 | 
				
			|||||||
wget -q "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip"
 | 
					wget -q "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip"
 | 
				
			||||||
unzip -q -d "/opt/teddycloud-${VERSION}" "teddycloud.amd64.release_v${VERSION}.zip"
 | 
					unzip -q -d "/opt/teddycloud-${VERSION}" "teddycloud.amd64.release_v${VERSION}.zip"
 | 
				
			||||||
ln -fns "/opt/teddycloud-${VERSION}" /opt/teddycloud
 | 
					ln -fns "/opt/teddycloud-${VERSION}" /opt/teddycloud
 | 
				
			||||||
 | 
					rm -rf teddycloud.amd64.release_v${VERSION}.zip
 | 
				
			||||||
echo "${VERSION}" >"/opt/${APPLICATION}_version.txt"
 | 
					echo "${VERSION}" >"/opt/${APPLICATION}_version.txt"
 | 
				
			||||||
msg_ok "Installed TeddyCloud"
 | 
					msg_ok "Installed TeddyCloud"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user