From 69067cbab56633dbe99f3aec2423a0353d33030f Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 23 Mar 2021 14:05:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf:=20=E5=8E=BB=E6=8E=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E7=9A=84=E5=8C=BA=E5=88=86=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=86=99=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose/docker-compose-mysql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/docker-compose-mysql.yml b/compose/docker-compose-mysql.yml index fa753b9d..9cf7d854 100644 --- a/compose/docker-compose-mysql.yml +++ b/compose/docker-compose-mysql.yml @@ -10,7 +10,7 @@ services: image: jumpserver/mysql:5 container_name: jms_mysql restart: always - command: --character-set-server=utf8 --collation-server=utf8_bin + command: --character-set-server=utf8 env_file: - ${CONFIG_FILE} volumes: From 9b1c01069ef17821e95a4f71343e5689e217c78f Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:33:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3mysql=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E9=9B=86=20(#70)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 优化 core 容器启动超时问题 * fix: 修正mysql字符集 * Revert "fix: 修正mysql字符集" This reverts commit c240beb479dc712efb37f5f07744848b9cd9d27d. * fix: 修正一些问题 * perf: 国际化文本修改 * perf: 增加 centos/redhat 系统判断 * perf: 优化 health 判断 Co-authored-by: wojiushixiaobai <296015668@qq.com> --- compose/docker-compose-app.yml | 14 +- compose/docker-compose-es.yml | 5 +- compose/docker-compose-external.yml | 10 +- compose/docker-compose-internal.yml | 10 +- compose/docker-compose-lb.yml | 3 +- compose/docker-compose-mysql.yml | 7 +- compose/docker-compose-network.yml | 3 +- compose/docker-compose-network_ipv6.yml | 2 +- compose/docker-compose-omnidb.yml | 7 +- compose/docker-compose-redis.yml | 7 +- compose/docker-compose-task.yml | 9 +- compose/docker-compose-xpack.yml | 5 +- locale/en/LC_MESSAGES/jumpserver-installer.mo | Bin 667 -> 431 bytes locale/en/LC_MESSAGES/jumpserver-installer.po | 358 ++++++++------- .../zh_CN/LC_MESSAGES/jumpserver-installer.mo | Bin 10259 -> 10638 bytes .../zh_CN/LC_MESSAGES/jumpserver-installer.po | 419 +++++++++--------- scripts/0_prepare.sh | 2 +- scripts/1_config_jumpserver.sh | 4 +- scripts/2_install_docker.sh | 8 +- scripts/8_uninstall.sh | 13 +- scripts/utils.sh | 20 +- 21 files changed, 484 insertions(+), 422 deletions(-) diff --git a/compose/docker-compose-app.yml b/compose/docker-compose-app.yml index 96ea3bcc..5fbb10a3 100644 --- a/compose/docker-compose-app.yml +++ b/compose/docker-compose-app.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: core: @@ -17,7 +17,8 @@ services: test: ["CMD", "curl", "-f", "http://localhost:8080/api/health/"] interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 60s networks: - net @@ -32,7 +33,8 @@ services: test: "curl -L http://localhost/luna/ > /dev/null" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net @@ -47,7 +49,8 @@ services: test: "curl -L http://localhost/ > /dev/null" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net @@ -66,6 +69,7 @@ services: test: ["CMD", "curl", "http://localhost:8080"] interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-es.yml b/compose/docker-compose-es.yml index ff8c5f26..6d95c466 100644 --- a/compose/docker-compose-es.yml +++ b/compose/docker-compose-es.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: core: @@ -23,6 +23,7 @@ services: test: ["CMD", "redis-cli", "-a", "$$REDIS_PASSWORD", "info"] interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-external.yml b/compose/docker-compose-external.yml index 67b2da1e..151ea745 100644 --- a/compose/docker-compose-external.yml +++ b/compose/docker-compose-external.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: nginx: @@ -24,7 +24,8 @@ services: test: ["CMD", "test", "-f", "/var/run/nginx.pid"] interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net @@ -45,9 +46,10 @@ services: - ${VOLUME_DIR}/koko/data:/opt/koko/data privileged: true healthcheck: - test: "ps axu | grep 'koko'" + test: "ps axu | grep -v 'grep' | grep 'koko'" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-internal.yml b/compose/docker-compose-internal.yml index 5f6b66b3..3a7dbedf 100644 --- a/compose/docker-compose-internal.yml +++ b/compose/docker-compose-internal.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: nginx: @@ -22,7 +22,8 @@ services: test: ["CMD", "test", "-f", "/var/run/nginx.pid"] interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net @@ -41,9 +42,10 @@ services: - ${VOLUME_DIR}/koko/data:/opt/koko/data privileged: true healthcheck: - test: "ps axu | grep 'koko'" + test: "ps axu | grep -v 'grep' | grep 'koko'" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-lb.yml b/compose/docker-compose-lb.yml index 382a0b53..573e003e 100644 --- a/compose/docker-compose-lb.yml +++ b/compose/docker-compose-lb.yml @@ -21,6 +21,7 @@ services: test: ["CMD", "test", "-f", "/var/run/nginx.pid"] interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-mysql.yml b/compose/docker-compose-mysql.yml index 9cf7d854..59965873 100644 --- a/compose/docker-compose-mysql.yml +++ b/compose/docker-compose-mysql.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: core: @@ -17,9 +17,10 @@ services: - ${CONFIG_DIR}/mysql/my.cnf:/etc/mysql/my.cnf - ${VOLUME_DIR}/mysql/data:/var/lib/mysql healthcheck: - test: "mysql -uroot -h127.0.0.1 -p$$MYSQL_ROOT_PASSWORD -e 'SHOW DATABASES;'" + test: "mysql -h127.0.0.1 -P$$DB_PORT -uroot -p$$MYSQL_ROOT_PASSWORD -e 'SHOW DATABASES;'" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-network.yml b/compose/docker-compose-network.yml index 0fc284dd..9e98cf9f 100644 --- a/compose/docker-compose-network.yml +++ b/compose/docker-compose-network.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' networks: net: @@ -7,4 +7,3 @@ networks: driver: default config: - subnet: ${DOCKER_SUBNET} - diff --git a/compose/docker-compose-network_ipv6.yml b/compose/docker-compose-network_ipv6.yml index a2be1a8c..8c767362 100644 --- a/compose/docker-compose-network_ipv6.yml +++ b/compose/docker-compose-network_ipv6.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' networks: net: diff --git a/compose/docker-compose-omnidb.yml b/compose/docker-compose-omnidb.yml index 46f17255..a062f993 100644 --- a/compose/docker-compose-omnidb.yml +++ b/compose/docker-compose-omnidb.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: omnidb: @@ -13,9 +13,10 @@ services: core: condition: service_healthy healthcheck: - test: "ps axu | grep 'omnidb'" + test: "ps axu | grep -v 'grep' | grep 'omnidb'" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-redis.yml b/compose/docker-compose-redis.yml index 807388fd..3b151c1e 100644 --- a/compose/docker-compose-redis.yml +++ b/compose/docker-compose-redis.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: core: @@ -17,9 +17,10 @@ services: env_file: - ${CONFIG_FILE} healthcheck: - test: ["CMD", "redis-cli", "-a", "$$REDIS_PASSWORD", "info"] + test: "redis-cli -h 127.0.0.1 -p $$REDIS_PORT -a $$REDIS_PASSWORD info" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/compose/docker-compose-task.yml b/compose/docker-compose-task.yml index 57058b25..d9ed561e 100644 --- a/compose/docker-compose-task.yml +++ b/compose/docker-compose-task.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: celery: @@ -18,9 +18,10 @@ services: - ${VOLUME_DIR}/core/data:/opt/jumpserver/data - ${VOLUME_DIR}/core/logs:/opt/jumpserver/logs healthcheck: - test: "cd /opt/jumpserver/apps && python manage.py check_celery &> /dev/null" - interval: 60s + test: "cd /opt/jumpserver/apps && python manage.py check_celery" + interval: 10s timeout: 10s - retries: 10 + retries: 3 + start_period: 30s networks: - net diff --git a/compose/docker-compose-xpack.yml b/compose/docker-compose-xpack.yml index aae0ce8a..3ed025b8 100644 --- a/compose/docker-compose-xpack.yml +++ b/compose/docker-compose-xpack.yml @@ -1,4 +1,4 @@ -version: '2.2' +version: '2.4' services: core: @@ -21,7 +21,8 @@ services: test: "ls -d /opt/xpack/" interval: 10s timeout: 5s - retries: 10 + retries: 3 + start_period: 10s networks: - net diff --git a/locale/en/LC_MESSAGES/jumpserver-installer.mo b/locale/en/LC_MESSAGES/jumpserver-installer.mo index 73059adb5ec0877dd3dc26d6f0f0f92b8032c3c8..e3af034ae3468d505a4bb36b5d118512e8796546 100644 GIT binary patch delta 80 zcmbQux}MqMo)F7a1|VPrVi_P-0b*t#)&XJ=umIvxprj>`2C0F8i6=w3jCGAH6%5U- M3@tWmFiJ220A6|t5C8xG delta 317 zcmZ3_Je#%to)F7a1|VPpVi_RT0b*7lwgF-g2ms;=APxlLQbq=bQ$RWjh#i0$fLu5L z=?4Rs{N(J^B89ZfoK%J6{DMk_v_v2?MNh#uu~H!^RiPv!u|xr?s5sTDs4O!%RUxxj zAu*>YH8G`9p{O)3FEcM)Paz;DHL*BVp|~W!0H`SyCIQo%n3tkZl&YIrk(yju0yLpy zqD3f|p{|jkf}y3Ak?F?i5{%JMYo0FYecG|@>5`2vwk*|Ac-p`IMf2WgGuA)dzUkSV uPMCQw_D^`Rut!JX#ro|}8|OS*y9grid{zrg#mn~IXVW%3>s$_0#{d9Dq-<{h diff --git a/locale/en/LC_MESSAGES/jumpserver-installer.po b/locale/en/LC_MESSAGES/jumpserver-installer.po index db019078..f5213071 100644 --- a/locale/en/LC_MESSAGES/jumpserver-installer.po +++ b/locale/en/LC_MESSAGES/jumpserver-installer.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-21 19:25+0800\n" +"POT-Creation-Date: 2021-03-29 17:18+0800\n" "PO-Revision-Date: 2021-01-21 19:15+0800\n" "Last-Translator: Bai \n" "Language-Team: Language locale/en/LC\n" @@ -16,102 +16,48 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: scripts/5_db_backup.sh:18 -msgid "Backing up" -msgstr "" - -#: scripts/5_db_backup.sh:24 -msgid "Backup failed" -msgstr "" - -#: scripts/5_db_backup.sh:28 -msgid "Backup succeeded! The backup file has been saved to" -msgstr "" - -#: scripts/utils.sh:123 -msgid "no default" -msgstr "" - -#: scripts/utils.sh:125 -msgid "default" -msgstr "" - -#: scripts/utils.sh:182 -msgid "complete" -msgstr "" - -#: scripts/utils.sh:186 -msgid "fail" -msgstr "" - -#: scripts/6_db_restore.sh:19 -msgid "Start restoring database" -msgstr "" - -#: scripts/6_db_restore.sh:23 -msgid "file does not exist" -msgstr "" - -#: scripts/6_db_restore.sh:34 -msgid "" -"Database recovery failed. Please check whether the database file is complete " -"or try to recover manually" -msgstr "" - -#: scripts/6_db_restore.sh:37 -msgid "Database recovered successfully" -msgstr "" - -#: scripts/6_db_restore.sh:43 -msgid "Format error" +#: scripts/0_prepare.sh:22 +msgid "Starting to download Docker engine" msgstr "" -#: scripts/6_db_restore.sh:47 -msgid "The backup file does not exist" +#: scripts/0_prepare.sh:24 +msgid "Download docker fails, check the network is normal" msgstr "" -#: scripts/2_install_docker.sh:32 -msgid "Docker program does not exist" +#: scripts/0_prepare.sh:28 +msgid "Using Docker cache" msgstr "" -#: scripts/2_install_docker.sh:51 -msgid "There are updates available currently. Do you want to update" +#: scripts/0_prepare.sh:39 +msgid "Starting to download Docker Compose binary" msgstr "" -#: scripts/2_install_docker.sh:58 -msgid "Docker file copy failed. May be that Docker service is already running. Please stop the running Docker and re-execute it" -msgstr "Docker 复制失败, 可能是已有 Docker 运行, 请停止运行的 Docker 重新执行" - -#: scripts/2_install_docker.sh:105 -msgid "" -"Modify the default storage directory of Docker image, you can select your " -"largest disk and create a directory in it, such as" +#: scripts/0_prepare.sh:41 +msgid "Download docker-compose fails, check the network is normal" msgstr "" -#: scripts/2_install_docker.sh:110 -msgid "Docker image storage directory" +#: scripts/0_prepare.sh:45 +msgid "Using Docker Compose cache" msgstr "" -#: scripts/2_install_docker.sh:132 -msgid "" -"Docker version has changed or Docker configuration file has been changed, do " -"you want to restart" +#: scripts/0_prepare.sh:57 +msgid "Docker is not running, please install and start" msgstr "" -#: scripts/2_install_docker.sh:151 -msgid "Skip docker installation on MacOS" +#: scripts/0_prepare.sh:92 +msgid "Save image" msgstr "" -#: scripts/2_install_docker.sh:154 -msgid "Install Docker" +#: scripts/0_prepare.sh:95 +msgid "The image has been saved, skipping" msgstr "" -#: scripts/2_install_docker.sh:156 -msgid "Configure Docker" +#: scripts/0_prepare.sh:107 +msgid "Preparing Docker offline package" msgstr "" -#: scripts/2_install_docker.sh:158 -msgid "Start Docker" +#: scripts/0_prepare.sh:111 +msgid "Preparing image offline package" msgstr "" #: scripts/1_config_jumpserver.sh:11 @@ -134,148 +80,158 @@ msgstr "" msgid "Please enter MySQL password" msgstr "" -#: scripts/1_config_jumpserver.sh:49 -msgid "Configure MySQL" +#: scripts/1_config_jumpserver.sh:27 +msgid "Failed to connect to database, please reset" msgstr "" #: scripts/1_config_jumpserver.sh:51 +msgid "Configure MySQL" +msgstr "" + +#: scripts/1_config_jumpserver.sh:57 msgid "Do you want to use external MySQL" msgstr "" -#: scripts/1_config_jumpserver.sh:63 +#: scripts/1_config_jumpserver.sh:69 msgid "Please enter Redis server IP" msgstr "" -#: scripts/1_config_jumpserver.sh:66 +#: scripts/1_config_jumpserver.sh:72 msgid "Please enter Redis server port" msgstr "" -#: scripts/1_config_jumpserver.sh:69 +#: scripts/1_config_jumpserver.sh:75 msgid "Please enter Redis password" msgstr "" -#: scripts/1_config_jumpserver.sh:91 +#: scripts/1_config_jumpserver.sh:79 +msgid "Failed to connect to redis, please reset" +msgstr "" + +#: scripts/1_config_jumpserver.sh:100 msgid "Configure Redis" msgstr "" -#: scripts/1_config_jumpserver.sh:93 +#: scripts/1_config_jumpserver.sh:106 msgid "Do you want to use external Redis" msgstr "" -#: scripts/1_config_jumpserver.sh:103 +#: scripts/1_config_jumpserver.sh:116 msgid "Configure Private Key" msgstr "" -#: scripts/1_config_jumpserver.sh:107 scripts/1_config_jumpserver.sh:112 -msgid "Auto-Generate" +#: scripts/1_config_jumpserver.sh:135 +msgid "Configure Persistent Directory" msgstr "" -#: scripts/1_config_jumpserver.sh:119 -msgid "Configure Persistent Directory" +#: scripts/1_config_jumpserver.sh:141 +msgid "Do you need custom persistent store, will use the default directory" msgstr "" -#: scripts/1_config_jumpserver.sh:120 +#: scripts/1_config_jumpserver.sh:144 msgid "" "To modify the persistent directory such as logs video, you can select your " "largest disk and create a directory in it, such as" msgstr "" -#: scripts/1_config_jumpserver.sh:141 -msgid "Do you need custom persistent store, will use the default directory" -msgstr "" - -#: scripts/1_config_jumpserver.sh:121 +#: scripts/1_config_jumpserver.sh:145 msgid "" "Note: you can not change it after installation, otherwise the database may " "be lost" msgstr "" -#: scripts/1_config_jumpserver.sh:129 +#: scripts/1_config_jumpserver.sh:149 msgid "Persistent storage directory" msgstr "" -#: scripts/1_config_jumpserver.sh:143 +#: scripts/1_config_jumpserver.sh:163 msgid "Check Configuration File" msgstr "" -#: scripts/1_config_jumpserver.sh:144 +#: scripts/1_config_jumpserver.sh:164 msgid "Path to Configuration file" msgstr "" -#: scripts/1_config_jumpserver.sh:160 +#: scripts/1_config_jumpserver.sh:191 msgid "Configure Nginx" msgstr "" -#: scripts/1_config_jumpserver.sh:161 +#: scripts/1_config_jumpserver.sh:192 msgid "configuration file" msgstr "" -#: scripts/1_config_jumpserver.sh:172 +#: scripts/1_config_jumpserver.sh:212 msgid "Backup Configuration File" msgstr "" -#: scripts/1_config_jumpserver.sh:174 +#: scripts/1_config_jumpserver.sh:214 msgid "Back up to" msgstr "" -#: scripts/1_config_jumpserver.sh:178 +#: scripts/1_config_jumpserver.sh:218 msgid "Configure Network" msgstr "" -#: scripts/1_config_jumpserver.sh:180 +#: scripts/1_config_jumpserver.sh:224 msgid "Do you want to support IPv6" msgstr "" -#: scripts/3_load_images.sh:21 -msgid "Docker image not found" +#: scripts/2_install_docker.sh:32 +msgid "Docker program does not exist" msgstr "" -#: scripts/3_load_images.sh:39 -msgid "Docker image loaded, skipping" +#: scripts/2_install_docker.sh:51 +msgid "There are updates available currently. Do you want to update" msgstr "" -#: scripts/0_prepare.sh:22 -msgid "Starting to download Docker engine" +#: scripts/2_install_docker.sh:58 +msgid "" +"Docker file copy failed. May be that docker service is already running. " +"Please stop the running docker and re-execute it" msgstr "" -#: scripts/0_prepare.sh:25 -msgid "Using Docker cache" +#: scripts/2_install_docker.sh:125 +msgid "Do you need custom docker root dir, will use the default directory" msgstr "" -#: scripts/0_prepare.sh:31 -msgid "Starting to download Docker Compose binary" +#: scripts/2_install_docker.sh:129 +msgid "" +"Modify the default storage directory of Docker image, you can select your " +"largest disk and create a directory in it, such as" msgstr "" -#: scripts/0_prepare.sh:34 -msgid "Using Docker Compose cache" +#: scripts/2_install_docker.sh:132 +msgid "Docker image storage directory" msgstr "" -#: scripts/0_prepare.sh:24 -msgid "Download docker fails, check the network is normal" +#: scripts/2_install_docker.sh:175 +msgid "" +"Docker version has changed or Docker configuration file has been changed, do " +"you want to restart" msgstr "" -#: scripts/0_prepare.sh:42 -msgid "Download docker-compose fails, check the network is normal" +#: scripts/2_install_docker.sh:203 +msgid "Skip docker installation on MacOS" msgstr "" -#: scripts/0_prepare.sh:43 -msgid "Docker is not running, please install and start" +#: scripts/2_install_docker.sh:206 +msgid "Install Docker" msgstr "" -#: scripts/0_prepare.sh:78 -msgid "Save image" +#: scripts/2_install_docker.sh:209 +msgid "Configure Docker" msgstr "" -#: scripts/0_prepare.sh:81 -msgid "The image has been saved, skipping" +#: scripts/2_install_docker.sh:211 +msgid "Start Docker" msgstr "" -#: scripts/0_prepare.sh:93 -msgid "Preparing Docker offline package" +#: scripts/3_load_images.sh:21 +msgid "Docker image not found" msgstr "" -#: scripts/0_prepare.sh:96 -msgid "Preparing image offline package" +#: scripts/3_load_images.sh:39 +msgid "Docker image loaded, skipping" msgstr "" #: scripts/4_install_jumpserver.sh:13 @@ -322,71 +278,111 @@ msgstr "" msgid "Documentation" msgstr "" -#: scripts/4_install_jumpserver.sh:50 +#: scripts/4_install_jumpserver.sh:72 +msgid "Install and Configure Docker" +msgstr "" + +#: scripts/4_install_jumpserver.sh:74 +msgid "Loading Docker Image" +msgstr "" + +#: scripts/4_install_jumpserver.sh:76 msgid "Install and Configure JumpServer" msgstr "" -#: scripts/4_install_jumpserver.sh:52 -msgid "Install and Configure Docker" +#: scripts/5_db_backup.sh:17 +msgid "Backing up" msgstr "" -#: scripts/4_install_jumpserver.sh:54 -msgid "Loading Docker Image" +#: scripts/5_db_backup.sh:23 +msgid "Backup failed" msgstr "" -#: scripts/7_upgrade.sh:80 -msgid "Failed to backup the database. Continue to upgrade" +#: scripts/5_db_backup.sh:27 +msgid "Backup succeeded! The backup file has been saved to" msgstr "" -#: scripts/7_upgrade.sh:86 -msgid "Skip database backup" +#: scripts/6_db_restore.sh:19 +msgid "Start restoring database" msgstr "" -#: scripts/7_upgrade.sh:97 -msgid "Are you sure you want to update the current version to" +#: scripts/6_db_restore.sh:23 +msgid "file does not exist" msgstr "" -#: scripts/7_upgrade.sh:107 -msgid "Check configuration changes" +#: scripts/6_db_restore.sh:34 +msgid "" +"Database recovery failed. Please check whether the database file is complete " +"or try to recover manually" msgstr "" -#: scripts/7_upgrade.sh:110 -msgid "Check program file changes" +#: scripts/6_db_restore.sh:37 +msgid "Database recovered successfully" +msgstr "" + +#: scripts/6_db_restore.sh:43 +msgid "Format error" +msgstr "" + +#: scripts/6_db_restore.sh:47 +msgid "The backup file does not exist" msgstr "" #: scripts/7_upgrade.sh:84 msgid "Do you need to update" msgstr "" -#: scripts/7_upgrade.sh:113 -msgid "Upgrade Docker image" +#: scripts/7_upgrade.sh:101 +msgid "Failed to backup the database. Continue to upgrade" +msgstr "" + +#: scripts/7_upgrade.sh:107 +msgid "Skip database backup" msgstr "" -#: scripts/7_upgrade.sh:113 -msgid "Detected that the jms_core container is running. Do you want to close the container and continue to upgrade" +#: scripts/7_upgrade.sh:114 +msgid "" +"Detected that the jms_core container is running. Do you want to close the " +"container and continue to upgrade" msgstr "" -#: scripts/7_upgrade.sh:114 +#: scripts/7_upgrade.sh:125 msgid "Failed to change the table structure" msgstr "" -#: scripts/7_upgrade.sh:116 +#: scripts/7_upgrade.sh:127 msgid "Failed to change the table structure. Continue to upgrade" msgstr "" -#: scripts/7_upgrade.sh:116 jmsctl.sh:59 +#: scripts/7_upgrade.sh:143 +msgid "Are you sure you want to update the current version to" +msgstr "" + +#: scripts/7_upgrade.sh:153 +msgid "Check configuration changes" +msgstr "" + +#: scripts/7_upgrade.sh:156 +msgid "Check program file changes" +msgstr "" + +#: scripts/7_upgrade.sh:159 +msgid "Upgrade Docker image" +msgstr "" + +#: scripts/7_upgrade.sh:162 jmsctl.sh:60 msgid "Backup database" msgstr "" -#: scripts/7_upgrade.sh:119 +#: scripts/7_upgrade.sh:165 msgid "Apply database changes" msgstr "" -#: scripts/7_upgrade.sh:120 +#: scripts/7_upgrade.sh:166 msgid "Changing database schema may take a while, please wait patiently" msgstr "" -#: scripts/7_upgrade.sh:123 +#: scripts/7_upgrade.sh:169 msgid "Upgrade successfully. You can now restart the program" msgstr "" @@ -398,7 +394,7 @@ msgstr "" msgid "Are you clean up JumpServer files" msgstr "" -#: scripts/8_uninstall.sh:20 +#: scripts/8_uninstall.sh:18 scripts/8_uninstall.sh:20 msgid "Cleaning up" msgstr "" @@ -406,10 +402,34 @@ msgstr "" msgid "Do you need to clean up the Docker image" msgstr "" -#: scripts/8_uninstall.sh:43 +#: scripts/8_uninstall.sh:34 msgid "Cleanup complete" msgstr "" +#: scripts/8_uninstall.sh:38 jmsctl.sh:55 +msgid "Uninstall JumpServer" +msgstr "" + +#: scripts/utils.sh:123 +msgid "no default" +msgstr "" + +#: scripts/utils.sh:125 +msgid "default" +msgstr "" + +#: scripts/utils.sh:182 +msgid "complete" +msgstr "" + +#: scripts/utils.sh:186 +msgid "fail" +msgstr "" + +#: scripts/utils.sh:278 +msgid "Please install it first" +msgstr "" + #: jmsctl.sh:13 msgid "Configuration file not found" msgstr "" @@ -435,15 +455,11 @@ msgid "Upgrade JumpServer" msgstr "" #: jmsctl.sh:45 -msgid "Reconfiguration JumpServer" -msgstr "" - -#: jmsctl.sh:46 msgid "Check for updates JumpServer" msgstr "" -#: jmsctl.sh:55 -msgid "Uninstall JumpServer" +#: jmsctl.sh:46 +msgid "Reconfiguration JumpServer" msgstr "" #: jmsctl.sh:49 @@ -470,34 +486,34 @@ msgstr "" msgid "Offline JumpServer" msgstr "" -#: jmsctl.sh:57 +#: jmsctl.sh:58 msgid "Loading docker image" msgstr "" -#: jmsctl.sh:58 +#: jmsctl.sh:59 msgid "Run python manage.py shell" msgstr "" -#: jmsctl.sh:60 +#: jmsctl.sh:61 msgid "Data recovery through database backup file" msgstr "" -#: jmsctl.sh:61 +#: jmsctl.sh:62 msgid "Execute the original docker-compose command" msgstr "" -#: jmsctl.sh:62 +#: jmsctl.sh:63 msgid "View log" msgstr "" -#: jmsctl.sh:117 +#: jmsctl.sh:126 msgid "The current version is up to date" msgstr "" -#: jmsctl.sh:120 +#: jmsctl.sh:129 msgid "The latest version is" msgstr "" -#: jmsctl.sh:121 jmsctl.sh:226 +#: jmsctl.sh:130 msgid "The current version is" msgstr "" diff --git a/locale/zh_CN/LC_MESSAGES/jumpserver-installer.mo b/locale/zh_CN/LC_MESSAGES/jumpserver-installer.mo index 7ec70b4e32b5018cb3fddc9ae729df1d5f34f43b..794edcd4cd49a7f4e235d86c5aa23916a9e1eefa 100644 GIT binary patch delta 3028 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 diff --git a/locale/zh_CN/LC_MESSAGES/jumpserver-installer.po b/locale/zh_CN/LC_MESSAGES/jumpserver-installer.po index 5af551a2..e59afbf1 100644 --- a/locale/zh_CN/LC_MESSAGES/jumpserver-installer.po +++ b/locale/zh_CN/LC_MESSAGES/jumpserver-installer.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-21 19:40+0800\n" +"POT-Creation-Date: 2021-03-29 17:18+0800\n" "PO-Revision-Date: 2021-01-21 19:15+0800\n" "Last-Translator: Bai \n" "Language-Team: Language locale/zh\n" @@ -16,103 +16,49 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: scripts/5_db_backup.sh:18 -msgid "Backing up" -msgstr "正在备份" - -#: scripts/5_db_backup.sh:24 -msgid "Backup failed" -msgstr "备份失败" - -#: scripts/5_db_backup.sh:28 -msgid "Backup succeeded! The backup file has been saved to" -msgstr "备份成功! 备份文件已存放至" - -#: scripts/utils.sh:123 -msgid "no default" -msgstr "无默认值" - -#: scripts/utils.sh:125 -msgid "default" -msgstr "默认为" - -#: scripts/utils.sh:182 -msgid "complete" -msgstr "完成" - -#: scripts/utils.sh:186 -msgid "fail" -msgstr "失败" - -#: scripts/6_db_restore.sh:19 -msgid "Start restoring database" -msgstr "开始还原数据库" - -#: scripts/6_db_restore.sh:23 -msgid "file does not exist" -msgstr "文件不存在" - -#: scripts/6_db_restore.sh:34 -msgid "" -"Database recovery failed. Please check whether the database file is complete " -"or try to recover manually" -msgstr "数据库恢复失败. 请检查数据库文件是否完整, 或尝试手动恢复" - -#: scripts/6_db_restore.sh:37 -msgid "Database recovered successfully" -msgstr "数据库恢复成功" - -#: scripts/6_db_restore.sh:43 -msgid "Format error" -msgstr "格式错误" - -#: scripts/6_db_restore.sh:47 -msgid "The backup file does not exist" -msgstr "备份文件不存在" +#: scripts/0_prepare.sh:22 +msgid "Starting to download Docker engine" +msgstr "开始下载 Docker 程序" -#: scripts/2_install_docker.sh:32 -msgid "Docker program does not exist" -msgstr "Docker 程序不存在" +#: scripts/0_prepare.sh:24 +msgid "Download docker fails, check the network is normal" +msgstr "下载 docker 失败, 请检查网络是否正常" -#: scripts/2_install_docker.sh:51 -msgid "There are updates available currently. Do you want to update" -msgstr "检测到 Docker 版本有更新, 是否更新" +#: scripts/0_prepare.sh:28 +msgid "Using Docker cache" +msgstr "使用 Docker 缓存文件" -#: scripts/2_install_docker.sh:58 -msgid "Docker file copy failed. May be that Docker service is already running. Please stop the running Docker and re-execute it" -msgstr "Docker 复制失败, 可能是已有 Docker 运行, 请停止运行的 Docker 重新执行" +#: scripts/0_prepare.sh:39 +msgid "Starting to download Docker Compose binary" +msgstr "开始下载 Docker Compose 程序" -#: scripts/2_install_docker.sh:105 -msgid "" -"Modify the default storage directory of Docker image, you can select your " -"largest disk and create a directory in it, such as" -msgstr "修改 Docker 镜像容器的默认存储目录, 可以找个最大的磁盘, 并创建目录, 如" +#: scripts/0_prepare.sh:41 +msgid "Download docker-compose fails, check the network is normal" +msgstr "下载 docker-compose 失败, 请检查网络是否正常" -#: scripts/2_install_docker.sh:110 -msgid "Docker image storage directory" -msgstr "Docker 镜像存储目录" +#: scripts/0_prepare.sh:45 +msgid "Using Docker Compose cache" +msgstr "使用 Docker Compose 缓存文件" -#: scripts/2_install_docker.sh:132 -msgid "" -"Docker version has changed or Docker configuration file has been changed, do " -"you want to restart" -msgstr "Docker 版本发生改变 或 Docker 配置文件发生变化,是否要重启" +#: scripts/0_prepare.sh:57 +msgid "Docker is not running, please install and start" +msgstr "Docker 没有运行, 请安装并启动" -#: scripts/2_install_docker.sh:151 -msgid "Skip docker installation on MacOS" -msgstr "MacOS 跳过安装 Docker" +#: scripts/0_prepare.sh:92 +msgid "Save image" +msgstr "保存镜像" -#: scripts/2_install_docker.sh:154 -msgid "Install Docker" -msgstr "安装 Docker" +#: scripts/0_prepare.sh:95 +msgid "The image has been saved, skipping" +msgstr "已保存过该镜像, 跳过" -#: scripts/2_install_docker.sh:156 -msgid "Configure Docker" -msgstr "配置 Docker" +#: scripts/0_prepare.sh:107 +msgid "Preparing Docker offline package" +msgstr "准备 Docker 离线包" -#: scripts/2_install_docker.sh:158 -msgid "Start Docker" -msgstr "启动 Docker" +#: scripts/0_prepare.sh:111 +msgid "Preparing image offline package" +msgstr "准备镜像离线包" #: scripts/1_config_jumpserver.sh:11 msgid "Please enter MySQL server IP" @@ -134,43 +80,47 @@ msgstr "请输入 mysql 的用户名" msgid "Please enter MySQL password" msgstr "请输入 mysql 的密码" -#: scripts/1_config_jumpserver.sh:49 +#: scripts/1_config_jumpserver.sh:27 +msgid "Failed to connect to database, please reset" +msgstr "测试连接数据库失败, 请重新设置" + +#: scripts/1_config_jumpserver.sh:51 msgid "Configure MySQL" msgstr "配置 MySQL" -#: scripts/1_config_jumpserver.sh:51 +#: scripts/1_config_jumpserver.sh:57 msgid "Do you want to use external MySQL" msgstr "是否使用外部 MySQL" -#: scripts/1_config_jumpserver.sh:63 +#: scripts/1_config_jumpserver.sh:69 msgid "Please enter Redis server IP" msgstr "请输入 Redis 的主机地址" -#: scripts/1_config_jumpserver.sh:66 +#: scripts/1_config_jumpserver.sh:72 msgid "Please enter Redis server port" msgstr "请输入 Redis 的端口" -#: scripts/1_config_jumpserver.sh:69 +#: scripts/1_config_jumpserver.sh:75 msgid "Please enter Redis password" msgstr "请输入 Redis 的密码" -#: scripts/1_config_jumpserver.sh:91 +#: scripts/1_config_jumpserver.sh:79 +msgid "Failed to connect to redis, please reset" +msgstr "测试连接 Redis 失败, 请重新设置" + +#: scripts/1_config_jumpserver.sh:100 msgid "Configure Redis" msgstr "配置 Redis" -#: scripts/1_config_jumpserver.sh:93 +#: scripts/1_config_jumpserver.sh:106 msgid "Do you want to use external Redis" msgstr "是否使用外部 Redis" -#: scripts/1_config_jumpserver.sh:103 +#: scripts/1_config_jumpserver.sh:116 msgid "Configure Private Key" msgstr "配置加密密钥" -#: scripts/1_config_jumpserver.sh:107 scripts/1_config_jumpserver.sh:112 -msgid "Auto-Generate" -msgstr "自动生成" - -#: scripts/1_config_jumpserver.sh:119 +#: scripts/1_config_jumpserver.sh:135 msgid "Configure Persistent Directory" msgstr "配置持久化目录" @@ -178,105 +128,111 @@ msgstr "配置持久化目录" msgid "Do you need custom persistent store, will use the default directory" msgstr "是否需要自定义持久化存储, 默认将使用目录" -#: scripts/1_config_jumpserver.sh:120 +#: scripts/1_config_jumpserver.sh:144 msgid "" "To modify the persistent directory such as logs video, you can select your " "largest disk and create a directory in it, such as" msgstr "修改日志录像等持久化的目录,可以找个最大的磁盘,并创建目录,如" -#: scripts/1_config_jumpserver.sh:121 +#: scripts/1_config_jumpserver.sh:145 msgid "" "Note: you can not change it after installation, otherwise the database may " "be lost" msgstr "注意:安装后不能更改,否则数据库可能会丢失" -#: scripts/1_config_jumpserver.sh:129 +#: scripts/1_config_jumpserver.sh:149 msgid "Persistent storage directory" msgstr "持久化存储目录" -#: scripts/1_config_jumpserver.sh:143 +#: scripts/1_config_jumpserver.sh:163 msgid "Check Configuration File" msgstr "检查配置文件" -#: scripts/1_config_jumpserver.sh:144 +#: scripts/1_config_jumpserver.sh:164 msgid "Path to Configuration file" msgstr "配置文件位置" -#: scripts/1_config_jumpserver.sh:160 +#: scripts/1_config_jumpserver.sh:191 msgid "Configure Nginx" msgstr "配置 Nginx" -#: scripts/1_config_jumpserver.sh:161 +#: scripts/1_config_jumpserver.sh:192 msgid "configuration file" msgstr "配置文件" -#: scripts/1_config_jumpserver.sh:172 +#: scripts/1_config_jumpserver.sh:212 msgid "Backup Configuration File" msgstr "备份配置文件" -#: scripts/1_config_jumpserver.sh:174 +#: scripts/1_config_jumpserver.sh:214 msgid "Back up to" msgstr "备份至" -#: scripts/1_config_jumpserver.sh:178 +#: scripts/1_config_jumpserver.sh:218 msgid "Configure Network" msgstr "配置网络" -#: scripts/1_config_jumpserver.sh:180 +#: scripts/1_config_jumpserver.sh:224 msgid "Do you want to support IPv6" msgstr "是否需要支持 IPv6" -#: scripts/3_load_images.sh:21 -msgid "Docker image not found" -msgstr "镜像文件没有发现" +#: scripts/2_install_docker.sh:32 +msgid "Docker program does not exist" +msgstr "Docker 程序不存在" -#: scripts/3_load_images.sh:39 -msgid "Docker image loaded, skipping" -msgstr "镜像已加载, 跳过" +#: scripts/2_install_docker.sh:51 +msgid "There are updates available currently. Do you want to update" +msgstr "检测到 Docker 版本有更新, 是否更新" -#: scripts/0_prepare.sh:22 -msgid "Starting to download Docker engine" -msgstr "开始下载 Docker 程序" +#: scripts/2_install_docker.sh:58 +msgid "" +"Docker file copy failed. May be that docker service is already running. " +"Please stop the running docker and re-execute it" +msgstr "Docker 复制失败, 可能是已有 Docker 运行, 请停止运行的 Docker 重新执行" -#: scripts/0_prepare.sh:25 -msgid "Using Docker cache" -msgstr "使用 Docker 缓存文件" +#: scripts/2_install_docker.sh:125 +msgid "Do you need custom docker root dir, will use the default directory" +msgstr "是否需要自定义 docker 存储目录, 默认将使用目录" -#: scripts/0_prepare.sh:24 -msgid "Download docker fails, check the network is normal" -msgstr "下载 docker 失败, 请检查网络是否正常" +#: scripts/2_install_docker.sh:129 +msgid "" +"Modify the default storage directory of Docker image, you can select your " +"largest disk and create a directory in it, such as" +msgstr "修改 Docker 镜像容器的默认存储目录, 可以找个最大的磁盘, 并创建目录, 如" -#: scripts/0_prepare.sh:42 -msgid "Download docker-compose fails, check the network is normal" -msgstr "下载 docker-compose 失败, 请检查网络是否正常" +#: scripts/2_install_docker.sh:132 +msgid "Docker image storage directory" +msgstr "Docker 镜像存储目录" -#: scripts/0_prepare.sh:31 -msgid "Starting to download Docker Compose binary" -msgstr "开始下载 Docker Compose 程序" +#: scripts/2_install_docker.sh:175 +msgid "" +"Docker version has changed or Docker configuration file has been changed, do " +"you want to restart" +msgstr "Docker 版本发生改变 或 Docker 配置文件发生变化,是否要重启" -#: scripts/0_prepare.sh:34 -msgid "Using Docker Compose cache" -msgstr "使用 Docker Compose 缓存文件" +#: scripts/2_install_docker.sh:203 +msgid "Skip docker installation on MacOS" +msgstr "MacOS 跳过安装 Docker" -#: scripts/0_prepare.sh:43 -msgid "Docker is not running, please install and start" -msgstr "Docker 没有运行, 请安装并启动" +#: scripts/2_install_docker.sh:206 +msgid "Install Docker" +msgstr "安装 Docker" -#: scripts/0_prepare.sh:78 -msgid "Save image" -msgstr "保存镜像" +#: scripts/2_install_docker.sh:209 +msgid "Configure Docker" +msgstr "配置 Docker" -#: scripts/0_prepare.sh:81 -msgid "The image has been saved, skipping" -msgstr "已保存过该镜像, 跳过" +#: scripts/2_install_docker.sh:211 +msgid "Start Docker" +msgstr "启动 Docker" -#: scripts/0_prepare.sh:93 -msgid "Preparing Docker offline package" -msgstr "准备 Docker 离线包" +#: scripts/3_load_images.sh:21 +msgid "Docker image not found" +msgstr "镜像文件没有发现" -#: scripts/0_prepare.sh:96 -msgid "Preparing image offline package" -msgstr "准备镜像离线包" +#: scripts/3_load_images.sh:39 +msgid "Docker image loaded, skipping" +msgstr "镜像已加载, 跳过" #: scripts/4_install_jumpserver.sh:13 msgid "The Installation is Complete" @@ -322,71 +278,111 @@ msgstr "我们的官网" msgid "Documentation" msgstr "我们的文档" -#: scripts/4_install_jumpserver.sh:50 -msgid "Install and Configure JumpServer" -msgstr "安装配置 JumpServer" - -#: scripts/4_install_jumpserver.sh:52 +#: scripts/4_install_jumpserver.sh:72 msgid "Install and Configure Docker" msgstr "安装配置 Docker" -#: scripts/4_install_jumpserver.sh:54 +#: scripts/4_install_jumpserver.sh:74 msgid "Loading Docker Image" msgstr "加载 Docker 镜像" -#: scripts/7_upgrade.sh:80 -msgid "Failed to backup the database. Continue to upgrade" -msgstr "备份数据库失败, 继续升级吗" +#: scripts/4_install_jumpserver.sh:76 +msgid "Install and Configure JumpServer" +msgstr "安装配置 JumpServer" -#: scripts/7_upgrade.sh:86 -msgid "Skip database backup" -msgstr "跳过备份数据库" +#: scripts/5_db_backup.sh:17 +msgid "Backing up" +msgstr "正在备份" -#: scripts/7_upgrade.sh:97 -msgid "Are you sure you want to update the current version to" -msgstr "是否将版本更新至" +#: scripts/5_db_backup.sh:23 +msgid "Backup failed" +msgstr "备份失败" -#: scripts/7_upgrade.sh:107 -msgid "Check configuration changes" -msgstr "检查配置变更" +#: scripts/5_db_backup.sh:27 +msgid "Backup succeeded! The backup file has been saved to" +msgstr "备份成功! 备份文件已存放至" -#: scripts/7_upgrade.sh:110 -msgid "Check program file changes" -msgstr "检查程序文件变更" +#: scripts/6_db_restore.sh:19 +msgid "Start restoring database" +msgstr "开始还原数据库" + +#: scripts/6_db_restore.sh:23 +msgid "file does not exist" +msgstr "文件不存在" + +#: scripts/6_db_restore.sh:34 +msgid "" +"Database recovery failed. Please check whether the database file is complete " +"or try to recover manually" +msgstr "数据库恢复失败. 请检查数据库文件是否完整, 或尝试手动恢复" + +#: scripts/6_db_restore.sh:37 +msgid "Database recovered successfully" +msgstr "数据库恢复成功" + +#: scripts/6_db_restore.sh:43 +msgid "Format error" +msgstr "格式错误" + +#: scripts/6_db_restore.sh:47 +msgid "The backup file does not exist" +msgstr "备份文件不存在" #: scripts/7_upgrade.sh:84 msgid "Do you need to update" msgstr "是否需要更新" -#: scripts/7_upgrade.sh:113 -msgid "Upgrade Docker image" -msgstr "升级镜像文件" +#: scripts/7_upgrade.sh:101 +msgid "Failed to backup the database. Continue to upgrade" +msgstr "备份数据库失败, 继续升级吗" -#: scripts/7_upgrade.sh:113 -msgid "Detected that the jms_core container is running. Do you want to close the container and continue to upgrade" +#: scripts/7_upgrade.sh:107 +msgid "Skip database backup" +msgstr "跳过备份数据库" + +#: scripts/7_upgrade.sh:114 +msgid "" +"Detected that the jms_core container is running. Do you want to close the " +"container and continue to upgrade" msgstr "检测到 jms_core 正在运行, 是否需要关闭 jms_core 并继续升级" -#: scripts/7_upgrade.sh:114 +#: scripts/7_upgrade.sh:125 msgid "Failed to change the table structure" msgstr "表结构变更失败" -#: scripts/7_upgrade.sh:116 +#: scripts/7_upgrade.sh:127 msgid "Failed to change the table structure. Continue to upgrade" msgstr "表结构变更失败, 是否继续" -#: scripts/7_upgrade.sh:116 jmsctl.sh:59 +#: scripts/7_upgrade.sh:143 +msgid "Are you sure you want to update the current version to" +msgstr "是否将版本更新至" + +#: scripts/7_upgrade.sh:153 +msgid "Check configuration changes" +msgstr "检查配置变更" + +#: scripts/7_upgrade.sh:156 +msgid "Check program file changes" +msgstr "检查程序文件变更" + +#: scripts/7_upgrade.sh:159 +msgid "Upgrade Docker image" +msgstr "升级镜像文件" + +#: scripts/7_upgrade.sh:162 jmsctl.sh:60 msgid "Backup database" msgstr "备份数据库" -#: scripts/7_upgrade.sh:119 +#: scripts/7_upgrade.sh:165 msgid "Apply database changes" msgstr "进行数据库变更" -#: scripts/7_upgrade.sh:120 +#: scripts/7_upgrade.sh:166 msgid "Changing database schema may take a while, please wait patiently" msgstr "表结构变更可能需要一段时间, 请耐心等待" -#: scripts/7_upgrade.sh:123 +#: scripts/7_upgrade.sh:169 msgid "Upgrade successfully. You can now restart the program" msgstr "升级成功, 可以重启程序了" @@ -398,7 +394,7 @@ msgstr "请确认已经备份好相关数据, 此操作不可逆" msgid "Are you clean up JumpServer files" msgstr "确认清理 JumpServer 相关文件" -#: scripts/8_uninstall.sh:20 +#: scripts/8_uninstall.sh:18 scripts/8_uninstall.sh:20 msgid "Cleaning up" msgstr "正在清理" @@ -406,10 +402,34 @@ msgstr "正在清理" msgid "Do you need to clean up the Docker image" msgstr "是否清理 Docker 镜像" -#: scripts/8_uninstall.sh:43 +#: scripts/8_uninstall.sh:34 msgid "Cleanup complete" msgstr "清理完成" +#: scripts/8_uninstall.sh:38 jmsctl.sh:55 +msgid "Uninstall JumpServer" +msgstr "卸载 JumpServer" + +#: scripts/utils.sh:123 +msgid "no default" +msgstr "无默认值" + +#: scripts/utils.sh:125 +msgid "default" +msgstr "默认为" + +#: scripts/utils.sh:182 +msgid "complete" +msgstr "完成" + +#: scripts/utils.sh:186 +msgid "fail" +msgstr "失败" + +#: scripts/utils.sh:278 +msgid "Please install it first" +msgstr "请先安装" + #: jmsctl.sh:13 msgid "Configuration file not found" msgstr "配置文件没有发现" @@ -435,16 +455,12 @@ msgid "Upgrade JumpServer" msgstr "升级 JumpServer" #: jmsctl.sh:45 -msgid "Reconfiguration JumpServer" -msgstr "重新配置 JumpServer" - -#: jmsctl.sh:46 msgid "Check for updates JumpServer" msgstr "检查 JumpServer" -#: jmsctl.sh:55 -msgid "Uninstall JumpServer" -msgstr "卸载 JumpServer" +#: jmsctl.sh:46 +msgid "Reconfiguration JumpServer" +msgstr "重新配置 JumpServer" #: jmsctl.sh:49 msgid "Start JumpServer" @@ -470,34 +486,37 @@ msgstr "检查 JumpServer" msgid "Offline JumpServer" msgstr "下线 JumpServer" -#: jmsctl.sh:57 +#: jmsctl.sh:58 msgid "Loading docker image" msgstr "加载 Docker 镜像" -#: jmsctl.sh:58 +#: jmsctl.sh:59 msgid "Run python manage.py shell" msgstr "运行 python manage.py shell" -#: jmsctl.sh:60 +#: jmsctl.sh:61 msgid "Data recovery through database backup file" msgstr "通过数据库备份文件恢复数据" -#: jmsctl.sh:61 +#: jmsctl.sh:62 msgid "Execute the original docker-compose command" msgstr "执行原始 docker-compose 命令" -#: jmsctl.sh:62 +#: jmsctl.sh:63 msgid "View log" msgstr "查看日志" -#: jmsctl.sh:117 +#: jmsctl.sh:126 msgid "The current version is up to date" msgstr "当前版本已是最新" -#: jmsctl.sh:120 +#: jmsctl.sh:129 msgid "The latest version is" msgstr "最新版本是" -#: jmsctl.sh:121 jmsctl.sh:226 +#: jmsctl.sh:130 msgid "The current version is" msgstr "当前版本是" + +#~ msgid "Auto-Generate" +#~ msgstr "自动生成" diff --git a/scripts/0_prepare.sh b/scripts/0_prepare.sh index e8824ec0..baae7b16 100755 --- a/scripts/0_prepare.sh +++ b/scripts/0_prepare.sh @@ -54,7 +54,7 @@ function prepare_compose_bin() { function prepare_image_files() { if ! pgrep -f "docker" > /dev/null; then - echo "$(gettext 'Docker is not running, please install and start')" + echo "$(gettext 'Docker is not running, please install and start') ..." exit 1 fi diff --git a/scripts/1_config_jumpserver.sh b/scripts/1_config_jumpserver.sh index c91e0389..6f7da983 100755 --- a/scripts/1_config_jumpserver.sh +++ b/scripts/1_config_jumpserver.sh @@ -24,7 +24,7 @@ function set_external_mysql() { test_mysql_connect ${mysql_host} ${mysql_port} ${mysql_user} ${mysql_pass} ${mysql_db} if [[ "$?" != "0" ]]; then - echo_red "测试连接数据库失败, 请重新设置" + echo_red "$(gettext 'Failed to connect to database, please reset')" echo set_mysql fi @@ -76,7 +76,7 @@ function set_external_redis() { test_redis_connect ${redis_host} ${redis_port} ${redis_password} if [[ "$?" != "0" ]]; then - echo_red "测试连接 Redis 失败, 请重新设置" + echo_red "$(gettext 'Failed to connect to redis, please reset')" echo set_redis fi diff --git a/scripts/2_install_docker.sh b/scripts/2_install_docker.sh index b386a8f6..4e032433 100755 --- a/scripts/2_install_docker.sh +++ b/scripts/2_install_docker.sh @@ -55,7 +55,7 @@ function install_docker() { fi if [[ "${docker_copy_failed}" != "0" ]]; then - echo_red "$(gettext 'Docker File copy failed. May be that docker service is already running. Please stop the running docker and re-execute it')" + echo_red "$(gettext 'Docker file copy failed. May be that docker service is already running. Please stop the running docker and re-execute it')" echo_red "systemctl stop docker" exit 1 fi @@ -122,7 +122,7 @@ function config_docker() { docker_storage_path="/var/lib/docker" fi confirm="n" - read_from_input confirm "是否需要自定义 Docker 数据目录, 默认将使用 ${docker_storage_path} 目录?" "y/n" "${confirm}" + read_from_input confirm "$(gettext 'Do you need custom docker root dir, will use the default directory') ${docker_storage_path}?" "y/n" "${confirm}" if [[ "${confirm}" == "y" ]]; then echo @@ -155,6 +155,9 @@ function check_docker_config() { cp ${PROJECT_DIR}/config-example.txt "${CONFIG_FILE}" \cp -rf ${PROJECT_DIR}/config_init/* "${CONFIG_DIR}" fi + if [[ ! -f "${CONFIG_FILE}" ]]; then + \cp -f ${PROJECT_DIR}/config-example.txt "${CONFIG_FILE}" + fi if [[ ! -f "/etc/docker/daemon.json" ]]; then config_docker else @@ -187,6 +190,7 @@ function start_docker() { } function check_docker_start() { + prepare_set_redhat_firewalld docker ps > /dev/null 2>&1 if [[ "$?" != "0" ]]; then start_docker diff --git a/scripts/8_uninstall.sh b/scripts/8_uninstall.sh index 75556a86..4fc41056 100644 --- a/scripts/8_uninstall.sh +++ b/scripts/8_uninstall.sh @@ -26,17 +26,8 @@ function remove_jumpserver() { confirm="n" read_from_input confirm "$(gettext 'Do you need to clean up the Docker image')?" "y/n" "${confirm}" if [[ "${confirm}" == "y" ]]; then - images=( - "jumpserver/redis:6-alpine" - "jumpserver/mysql:5" - "jumpserver/nginx:alpine2" - "jumpserver/luna:${VERSION}" - "jumpserver/core:${VERSION}" - "jumpserver/koko:${VERSION}" - "jumpserver/guacamole:${VERSION}" - "jumpserver/lina:${VERSION}" - ) - for image in "${images[@]}"; do + images=$(get_images public) + for image in ${images}; do docker rmi ${image} done fi diff --git a/scripts/utils.sh b/scripts/utils.sh index e066eb0c..518ee0d3 100755 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -275,7 +275,7 @@ function install_required_pkg() { elif command -v apk > /dev/null; then apk add -q $required_pkg else - echo_red "请先安装 $required_pkg " + echo_red "$(gettext 'Please install it first') $required_pkg" exit 1 fi } @@ -286,6 +286,24 @@ function prepare_online_install_required_pkg() { done } +function prepare_set_redhat_firewalld() { + if [[ -f "/etc/redhat-release" ]]; then + if [[ "$(firewall-cmd --state)" == "running" ]]; then + docker_subnet=$(get_config DOCKER_SUBNET) + if [[ ! "$(firewall-cmd --list-rich-rule | grep ${docker_subnet})" ]]; then + firewall-cmd --permanent --zone=public --add-rich-rule="rule family=ipv4 source address=${docker_subnet} accept" + firewall-cmd --reload + fi + if command -v dnf > /dev/null; then + if [[ ! "$(firewall-cmd --list-all | grep 'masquerade: yes')" ]]; then + firewall-cmd --permanent --add-masquerade + firewall-cmd --reload + fi + fi + fi + fi +} + function echo_logo() { cat <<"EOF"