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}"