diff options
| author | shizhendong <[email protected]> | 2023-04-27 10:10:28 +0800 |
|---|---|---|
| committer | shizhendong <[email protected]> | 2023-04-27 10:10:28 +0800 |
| commit | 8e7b0c79405123a1bd3345571821bcb7babd797e (patch) | |
| tree | fbf55c21be7ead11c1ba4c340008ede09e4d7b11 | |
| parent | b6b925644f9913ababae252db4d20c1e5c2d6792 (diff) | |
fix: NEZ-2138 rpm 升级脚本中替换 application-prod.yml 配置文件中 promtail 服务名称rel-23.04.02rel-23.04.01rel-22.10.07dev-3.5
1. 修复使用 rpm 升级安装包时,会自动还原配置文件,导致 application-prod.yml 中依然是 promtail,没有更名为 nz-promtail 问题
| -rw-r--r-- | tools/afterinstall.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/afterinstall.sh b/tools/afterinstall.sh index a487e9a..77eac1d 100644 --- a/tools/afterinstall.sh +++ b/tools/afterinstall.sh @@ -134,6 +134,11 @@ if [ 2 -eq $1 ];then # nz-talon config restoreComponentConfig $TALON_PATH/config $TMP_PATH/config + # promtail.service 名称改为 nz-promtail.service + # 这里重新替换下 application-prod.yml 中的 systemctl start|stop promtail 命令 + sed -i 's/systemctl start promtail/systemctl start nz-promtail/g' $TALON_PATH/config/application-prod.yml + sed -i 's/systemctl stop promtail/systemctl stop nz-promtail/g' $TALON_PATH/config/application-prod.yml + # promtail config restoreComponentConfig $PROMTAIL_PATH $TMP_PATH/promtail |
