Skip to content

Commit

Permalink
Oracle GoldenGate on Docker (oracle#1008)
Browse files Browse the repository at this point in the history
- Use if/then statements instead of simple tests for improved
   compatibility with older versions of Bash.

Signed-off-by: Stephen Balousek <[email protected]>
  • Loading branch information
sbalousek authored and Djelibeybi committed Oct 10, 2018
1 parent 3f8a9a9 commit 0ef95f9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions OracleGoldenGate/runOracleGoldenGate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ OGGProcesses="(adminclient|adminsrvr|distsrvr|extract|ggsci|pmsrvr|recvsrvr|repl
##
function generatePassword {
local password="$(openssl rand -base64 9)-$(openssl rand -base64 3)"
[[ "${password}" == "${password/[A-Z]/_}" ]] && { generatePassword; return }
[[ "${password}" == "${password/[a-z]/_}" ]] && { generatePassword; return }
[[ "${password}" == "${password/[0-9]/_}" ]] && { generatePassword; return }
export OGG_ADMIN_PWD="${password}"
if [[ "${password}" != "${password/[A-Z]/_}" && \
"${password}" != "${password/[a-z]/_}" && \
"${password}" != "${password/[0-9]/_}" ]]; then
export OGG_ADMIN_PWD="${password}"
return
fi
generatePassword
}

##
Expand Down

0 comments on commit 0ef95f9

Please sign in to comment.