Update postgres path - it could be on pg_ctl could be at /usr/bin/pg_ctl or  /opt/rh/rh-postgresql12/root/usr/bin/
Use the PATH instead of specific location
@@ -7,5 +7,5 @@ set -o errexit
mkdir -p /tmp/postgres/data
mkdir -p /tmp/postgres/sockets
-/usr/bin/initdb -D /tmp/postgres/data -U postgres
-/opt/rh/rh-postgresql12/root/usr/bin/pg_ctl -D /tmp/postgres/data -l /tmp/postgres/logfile -o'-k /tmp/postgres/sockets' start
+initdb -D /tmp/postgres/data -U postgres
+pg_ctl -D /tmp/postgres/data -l /tmp/postgres/logfile -o'-k /tmp/postgres/sockets' start
