Skip to content

Commit

Permalink
Merge pull request #464 from jumpserver/pr@v3@add_upgrade_message
Browse files Browse the repository at this point in the history
perf: 优化升级说明
  • Loading branch information
wojiushixiaobai authored Jul 10, 2024
2 parents 6c78582 + ec5dcd9 commit 8d7be01
Show file tree
Hide file tree
Showing 6 changed files with 639 additions and 666 deletions.
21 changes: 1 addition & 20 deletions jmsctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function usage() {
echo
echo "Installation Commands: "
echo " install $(gettext 'Install JumpServer')"
echo " upgrade $(gettext 'Upgrade JumpServer')"
echo
echo "Management Commands: "
echo " config $(gettext 'Configuration Tools')"
Expand Down Expand Up @@ -124,26 +125,6 @@ function check_update() {
else
exit 1
fi
echo -e "$(gettext 'The current version is'): ${current_version}"
Install_DIR="$(cd "$(dirname "${PROJECT_DIR}")" >/dev/null 2>&1 && pwd)"
if [[ ! -d "${Install_DIR}/jumpserver-installer-${latest_version}" ]]; then
if [[ ! -f "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" ]]; then
timeout 60s wget -qO "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" "https://github.com/jumpserver/installer/releases/download/${latest_version}/jumpserver-installer-${latest_version}.tar.gz" || {
rm -f "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz"
timeout 60s wget -qO "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" "https://demo.jumpserver.org/download/installer/${latest_version}/jumpserver-installer-${latest_version}.tar.gz" || {
rm -f "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz"
exit 1
}
}
fi
tar -xf "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" -C "${Install_DIR}" || {
rm -rf "${Install_DIR}/jumpserver-installer-${latest_version}" "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz"
exit 1
}
fi
cd "${Install_DIR}/jumpserver-installer-${latest_version}" || exit 1
echo
./jmsctl.sh upgrade "${latest_version}"
}

function video-worker() {
Expand Down
Loading

0 comments on commit 8d7be01

Please sign in to comment.