From 4ead90ef0bb5e4d024b36858cc91d5a7f43c39f4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:07:48 +0100 Subject: [PATCH] little fix tianji --- ct/tianji.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ct/tianji.sh b/ct/tianji.sh index 1ac59203..96b2d567 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -36,7 +36,8 @@ function update_script() { msg_info "Stopping ${APP} Service" systemctl stop tianji msg_ok "Stopped ${APP} Service" - msg_info "Updating ${APP} to ${RELEASE}" + + msg_info "Updating ${APP} to v${RELEASE}" cd /opt cp /opt/tianji/src/server/.env /opt/.env mv /opt/tianji /opt/tianji_bak @@ -54,10 +55,12 @@ function update_script() { cd src/server pnpm db:migrate:apply >/dev/null 2>&1 echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated ${APP} to ${RELEASE}" + msg_ok "Updated ${APP} to v${RELEASE}" + msg_info "Starting ${APP}" systemctl start tianji msg_ok "Started ${APP}" + msg_info "Cleaning up" rm -R /opt/v${RELEASE}.zip rm -rf /opt/tianji_bak @@ -67,7 +70,7 @@ function update_script() { msg_ok "Cleaned" msg_ok "Updated Successfully" else - msg_ok "No update required. ${APP} is already at ${RELEASE}." + msg_ok "No update required. ${APP} is already at v${RELEASE}." fi exit } @@ -79,4 +82,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:12345${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:12345${CL}"