Skip to content

Commit

Permalink
feat: 优化 Linux 安装脚本 cd 目录不存在脚本不退出的问题 (closed TencentBlueKing#2145)
Browse files Browse the repository at this point in the history
  • Loading branch information
ping15 authored and ZhuoZhuoCrayon committed Apr 24, 2024
1 parent 0e623a6 commit 2732949
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script_tools/setup_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ remove_agent () {

backup_config_file
log remove_agent - "trying to remove old agent directory(${AGENT_SETUP_PATH})"
cd "${AGENT_SETUP_PATH}"
cd "${AGENT_SETUP_PATH}" || return 0
for file in `lsattr -R |egrep "i-" |awk '{print $NF}'`;do echo "--- $file" && chattr -i $file ;done
cd -
rm -rf "${AGENT_SETUP_PATH}"
Expand Down

0 comments on commit 2732949

Please sign in to comment.