diff --git a/jmsctl.sh b/jmsctl.sh index 932555ca..b101d225 100755 --- a/jmsctl.sh +++ b/jmsctl.sh @@ -52,7 +52,6 @@ function usage() { echo "Management Commands: " echo " start $(gettext 'Start JumpServer')" echo " stop $(gettext 'Stop JumpServer')" - echo " close $(gettext 'Close JumpServer')" echo " restart $(gettext 'Restart JumpServer')" echo " status $(gettext 'Check JumpServer')" echo " down $(gettext 'Offline JumpServer')" @@ -86,13 +85,7 @@ function stop() { ${EXE} stop "${target}" && ${EXE} rm -f "${target}" return fi - services=$(get_docker_compose_services ignore_db) - for i in ${services}; do - ${EXE} stop "${i}" - done - for i in ${services}; do - ${EXE} rm -f "${i}" >/dev/null - done + ${EXE} down -v } function close() { diff --git a/scripts/utils.sh b/scripts/utils.sh index 774cb658..7df8b05a 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -292,11 +292,6 @@ function get_docker_compose_services() { if [[ "${use_minio}" == "1" ]]; then services+=" minio" fi - use_lb=$(get_config USE_LB) - https_port=$(get_config HTTPS_PORT) - if [[ -n "${https_port}" && "${use_lb}" != "0" ]]; then - services+=" lb" - fi use_xpack=$(get_config_or_env USE_XPACK) if [[ "${use_xpack}" == "1" ]]; then services+=" razor xrdp video" @@ -363,7 +358,9 @@ function get_docker_compose_cmd_line() { if [[ "${services}" =~ minio ]]; then cmd="${cmd} -f compose/docker-compose-minio.yml" fi - if [[ "${services}" =~ lb ]]; then + use_lb=$(get_config USE_LB) + https_port=$(get_config HTTPS_PORT) + if [[ -n "${https_port}" && "${use_lb}" != "0" ]]; then cmd="${cmd} -f compose/docker-compose-lb.yml" fi use_xpack=$(get_config_or_env USE_XPACK)