mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	little fix tianji
This commit is contained in:
		
							
								
								
									
										11
									
								
								ct/tianji.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								ct/tianji.sh
									
									
									
									
									
								
							@@ -36,7 +36,8 @@ function update_script() {
 | 
				
			|||||||
    msg_info "Stopping ${APP} Service"
 | 
					    msg_info "Stopping ${APP} Service"
 | 
				
			||||||
    systemctl stop tianji
 | 
					    systemctl stop tianji
 | 
				
			||||||
    msg_ok "Stopped ${APP} Service"
 | 
					    msg_ok "Stopped ${APP} Service"
 | 
				
			||||||
    msg_info "Updating ${APP} to ${RELEASE}"
 | 
					    
 | 
				
			||||||
 | 
					    msg_info "Updating ${APP} to v${RELEASE}"
 | 
				
			||||||
    cd /opt
 | 
					    cd /opt
 | 
				
			||||||
    cp /opt/tianji/src/server/.env /opt/.env
 | 
					    cp /opt/tianji/src/server/.env /opt/.env
 | 
				
			||||||
    mv /opt/tianji /opt/tianji_bak
 | 
					    mv /opt/tianji /opt/tianji_bak
 | 
				
			||||||
@@ -54,10 +55,12 @@ function update_script() {
 | 
				
			|||||||
    cd src/server
 | 
					    cd src/server
 | 
				
			||||||
    pnpm db:migrate:apply >/dev/null 2>&1
 | 
					    pnpm db:migrate:apply >/dev/null 2>&1
 | 
				
			||||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
					    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
				
			||||||
    msg_ok "Updated ${APP} to ${RELEASE}"
 | 
					    msg_ok "Updated ${APP} to v${RELEASE}"
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    msg_info "Starting ${APP}"
 | 
					    msg_info "Starting ${APP}"
 | 
				
			||||||
    systemctl start tianji
 | 
					    systemctl start tianji
 | 
				
			||||||
    msg_ok "Started ${APP}"
 | 
					    msg_ok "Started ${APP}"
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    msg_info "Cleaning up"
 | 
					    msg_info "Cleaning up"
 | 
				
			||||||
    rm -R /opt/v${RELEASE}.zip
 | 
					    rm -R /opt/v${RELEASE}.zip
 | 
				
			||||||
    rm -rf /opt/tianji_bak
 | 
					    rm -rf /opt/tianji_bak
 | 
				
			||||||
@@ -67,7 +70,7 @@ function update_script() {
 | 
				
			|||||||
    msg_ok "Cleaned"
 | 
					    msg_ok "Cleaned"
 | 
				
			||||||
    msg_ok "Updated Successfully"
 | 
					    msg_ok "Updated Successfully"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    msg_ok "No update required.  ${APP} is already at ${RELEASE}."
 | 
					    msg_ok "No update required.  ${APP} is already at v${RELEASE}."
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  exit
 | 
					  exit
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -79,4 +82,4 @@ description
 | 
				
			|||||||
msg_ok "Completed Successfully!\n"
 | 
					msg_ok "Completed Successfully!\n"
 | 
				
			||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
					echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
				
			||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
					echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
				
			||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:12345${CL}"
 | 
					echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:12345${CL}"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user