Skip to content

Commit

Permalink
Merge pull request #4188 from LiilyZhang/zhangl/Issue4179
Browse files Browse the repository at this point in the history
Issue #4179 - Bug: agent-uninstall.sh doesn't doesn't jus…
  • Loading branch information
LiilyZhang authored Dec 11, 2024
2 parents 6825964 + b86b77d commit 8a3e306
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions agent-install/agent-uninstall.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ SKIP_DELETE_AGENT_NAMESPACE=false
USE_DELETE_FORCE=false
DELETE_TIMEOUT=10 # Default delete timeout

function now() {
echo `date '+%Y-%m-%d %H:%M:%S'`
}

# Exit handling
function quit(){
case $1 in
Expand Down Expand Up @@ -216,7 +212,7 @@ function get_agent_pod_id() {
fi

if [ "$AGENT_POD_READY" == "true" ]; then
POD_ID=$($KUBECTL get pod -n ${AGENT_NAMESPACE} 2> /dev/null | grep "agent-" | cut -d " " -f1 2> /dev/null)
POD_ID=$($KUBECTL get pod -n ${AGENT_NAMESPACE} -l app=agent,type!=auto-upgrade-cronjob 2> /dev/null | grep "agent-" | cut -d " " -f1 2> /dev/null)
if [ -n "${POD_ID}" ]; then
log_info "get pod: ${POD_ID}"
else
Expand Down Expand Up @@ -288,8 +284,9 @@ function unregister() {
log_debug "unregister() end"
}

# escape: ;, $, &, |, (, )
function getEscapedExchangeUserAuth() {
local escaped_auth=$( echo "${HZN_EXCHANGE_USER_AUTH}" | sed 's/;/\\;/g;s/\$/\\$/g;s/\&/\\&/g;s/|/\\|/g' )
local escaped_auth=$( echo "${HZN_EXCHANGE_USER_AUTH}" | sed 's/;/\\;/g;s/\$/\\$/g;s/\&/\\&/g;s/|/\\|/g;s/(/\\(/g;s/)/\\)/g' )
echo "${escaped_auth}"
}

Expand Down

0 comments on commit 8a3e306

Please sign in to comment.