Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修正升级时 xrdp 端口报错问题 #325

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compose/docker-compose-xpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions config-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ JUMPSERVER_ENABLE_FONT_SMOOTHING=true
# XPack 包, 开源版本设置无效
#
RDP_PORT=3389
XRDP_PORT=3390

################################## 其他配置 ##################################
# 终端使用宿主 HOSTNAME 标识, 首次安装自动生成
Expand Down
5 changes: 5 additions & 0 deletions scripts/7_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down