Skip to content

Commit

Permalink
修复配置RTVS_CARSA_PEMKEY_PATH无效
Browse files Browse the repository at this point in the history
  • Loading branch information
vanjoge committed Feb 2, 2024
1 parent f0d5753 commit a193e86
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
15 changes: 14 additions & 1 deletion script/cdvr/startcdvr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ function init_system_files_path()
exit 1
fi

# 复制CARsaPem
if [ -n "$RTVS_CARSA_PEMKEY_PATH" ]; then
if [[ -f "$RTVS_CARSA_PEMKEY_PATH" ]]; then
echo "拷贝RSA文件: $RTVS_CARSA_PEMKEY_PATH $CDVR_DOCKER_PATH/token2rsa.pem"
cp -f $RTVS_CARSA_PEMKEY_PATH $CDVR_DOCKER_PATH/token2rsa.pem
else
echo "缺少$RTVS_CARSA_PEMKEY_PATH文件...已退出安装!"
exit 1
fi
else
rm $CDVR_DOCKER_PATH/token2rsa.pem 2>/dev/null
fi

# 复制集群管理文件
if [[ ! -d $CDVR_DOCKER_PATH/Config ]]; then
mkdir $CDVR_DOCKER_PATH/Config
Expand Down Expand Up @@ -89,7 +102,7 @@ function update_config(){
updateXml $CDVR_DOCKER_PATH/SettingConfig.xml Prefix "$CDVR_PREFIX"
updateXml $CDVR_DOCKER_PATH/SettingConfig.xml SwaggerDoc $SwaggerUI
updateXml $CDVR_DOCKER_PATH/SettingConfig.xml DiskReserveSpace $CDVR_KEEP_GB
updateXml $CDVR_DOCKER_PATH/SettingConfig.xml CARsaPem $RTVS_CARSA_PEMKEY_PATH
updateXml $CDVR_DOCKER_PATH/SettingConfig.xml CARsaPem "/MyData/token2rsa.pem"


if [ ! -n "$ClusterServer" ] ;then
Expand Down
17 changes: 16 additions & 1 deletion script/run_rtvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ function init_system_files_path()
fi




# 创建rtvs目录
if [[ ! -d $DOCKER_RTVSWEB_PATH ]]; then
mkdir $DOCKER_RTVSWEB_PATH
Expand Down Expand Up @@ -188,6 +190,19 @@ function init_system_files_path()
rm $DOCKER_RTVSWEB_PATH/certificate.pfx 2>/dev/null
fi

# 复制CARsaPem
if [ -n "$RTVS_CARSA_PEMKEY_PATH" ]; then
if [[ -f "$RTVS_CARSA_PEMKEY_PATH" ]]; then
echo "拷贝RSA文件: $RTVS_CARSA_PEMKEY_PATH $DOCKER_RTVSWEB_PATH/token2rsa.pem"
cp -f $RTVS_CARSA_PEMKEY_PATH $DOCKER_RTVSWEB_PATH/token2rsa.pem
else
echo "缺少$RTVS_CARSA_PEMKEY_PATH文件...已退出安装!"
exit 1
fi
else
rm $DOCKER_RTVSWEB_PATH/token2rsa.pem 2>/dev/null
fi

# 复制集群管理文件
if [[ ! -d $DOCKER_RTVSWEB_PATH/Config ]]; then
mkdir $DOCKER_RTVSWEB_PATH/Config
Expand Down Expand Up @@ -797,7 +812,7 @@ function update_config(){

updateXml $DOCKER_RTVSWEB_PATH/SettingConfig.xml ClientAuth $RTVS_CLIENT_AUTH
updateXml $DOCKER_RTVSWEB_PATH/SettingConfig.xml TokenTimeoutSec $RTVS_TOKEN_TIMEOUT_SEC
updateXml $DOCKER_RTVSWEB_PATH/SettingConfig.xml CARsaPem $RTVS_CARSA_PEMKEY_PATH
updateXml $DOCKER_RTVSWEB_PATH/SettingConfig.xml CARsaPem "/MyData/token2rsa.pem"
updateXml $DOCKER_RTVSWEB_PATH/SettingConfig.xml CARsaTimeoutSec $RTVS_CARSA_TIMEOUT_SEC


Expand Down

0 comments on commit a193e86

Please sign in to comment.