diff --git a/compose/docker-compose-xpack.yml b/compose/docker-compose-xpack.yml index 6fd2d5fc..982bdb84 100644 --- a/compose/docker-compose-xpack.yml +++ b/compose/docker-compose-xpack.yml @@ -60,7 +60,7 @@ services: env_file: - ${CONFIG_FILE} ports: - - ${XRDP_PORT}:3390 + - ${XRDP_PORT:-3390}:3390 volumes: - ${VOLUME_DIR}/xrdp/data:/opt/xrdp/data - ${CONFIG_DIR}/nginx/cert:/opt/xrdp/cert diff --git a/config-example.txt b/config-example.txt index 20aa2b17..9cd5e783 100644 --- a/config-example.txt +++ b/config-example.txt @@ -120,6 +120,7 @@ JUMPSERVER_ENABLE_FONT_SMOOTHING=true # XPack 包, 开源版本设置无效 # RDP_PORT=3389 +XRDP_PORT=3390 ################################## 其他配置 ################################## # 终端使用宿主 HOSTNAME 标识, 首次安装自动生成 diff --git a/scripts/7_upgrade.sh b/scripts/7_upgrade.sh index 96d2027e..6f36618a 100644 --- a/scripts/7_upgrade.sh +++ b/scripts/7_upgrade.sh @@ -105,6 +105,11 @@ function upgrade_config() { MAGNUS_ORACLE_PORTS=30000-30030 set_config MAGNUS_ORACLE_PORTS "${MAGNUS_ORACLE_PORTS}" fi + xrdp_port=$(get_config XRDP_PORT) + if [ -z "${xrdp_port}" ]; then + XRDP_PORT=3390 + set_config XRDP_PORT "${XRDP_PORT}" + fi fi }