diff --git a/OracleGoldenGate/23/README.md b/OracleGoldenGate/23/README.md index 62004448e2..5536f5ed90 100644 --- a/OracleGoldenGate/23/README.md +++ b/OracleGoldenGate/23/README.md @@ -163,7 +163,7 @@ Version 23.4 ... ### Running Scripts Before Setup and on Startup -The container images can be configured to run scripts before setup and on startup. Currently, `.sh` extensions are supported. For setup scripts just mount the volume `/u01/ogg/scripts/setup` or extend the image to include scripts in this directory. For startup scripts just mount the volume `/u01/ogg/scripts/startup` or extend the image to include scripts in this directory. Both of those locations +The container images can be configured to run scripts before setup and on startup. Currently, `.sh` and `.py` extensions are supported. For setup scripts just mount the volume `/u01/ogg/scripts/setup` or extend the image to include scripts in this directory. For startup scripts just mount the volume `/u01/ogg/scripts/startup` or extend the image to include scripts in this directory. Both of those locations are static and the content is controlled by the volume mount. The example below mounts the local directory `${PWD}/myScripts` to `/u01/ogg/scripts` which is then searched for custom startup scripts: diff --git a/OracleGoldenGate/23/bin/deployment-main.sh b/OracleGoldenGate/23/bin/deployment-main.sh index ed799f48bf..ec9f534342 100755 --- a/OracleGoldenGate/23/bin/deployment-main.sh +++ b/OracleGoldenGate/23/bin/deployment-main.sh @@ -125,10 +125,14 @@ function run_user_scripts { while read -r script; do case "${script}" in *.sh) - echo "Running script '${script}'" + echo "Running shell script '${script}'" # shellcheck disable=SC1090 source "${script}" ;; + *.py) + echo "Running Python script '${script}'" + python3 "${script}" + ;; *) echo "Ignoring '${script}'" ;;