Skip to content

Commit

Permalink
Use tee to direct post upgrade scripting output to container log
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift committed Oct 2, 2024
1 parent 9012403 commit d37f307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ _main() {

# For development of pgautoupgrade. This spot leaves the container running, prior to the pgautoupgrade scripting
# executing
UPGRADE_PERFORMED=0
local UPGRADE_PERFORMED=0
if [ "x${PGAUTO_DEVEL}" = "xbefore" ]; then
echo "---------------------------------------------------------------------------"
echo "In pgautoupgrade development mode, paused prior to pgautoupgrade scripting."
Expand Down Expand Up @@ -607,7 +607,7 @@ _main() {
# Launch script that does the background post-upgrade tasks
echo "**********************************************************************************************************************"
TIMESTAMP_NOW=$(date +'%Y.%m.%d-%H.%M')
/usr/local/bin/pgautoupgrade-postupgrade.sh "${SCRIPT_OPTIONS}" >"${PGDATA}/${TIMESTAMP_NOW}-pgautoupgrade.log" 2>&1 &
/usr/local/bin/pgautoupgrade-postupgrade.sh "${SCRIPT_OPTIONS}" 2>&1 | tee "${PGDATA}/${TIMESTAMP_NOW}-pgautoupgrade.log" &
echo "Post upgrade script launched, with output being saved to ${PGDATA}/${TIMESTAMP_NOW}-pgautoupgrade.log in the container"
echo "**********************************************************************************************************************"
fi
Expand Down

0 comments on commit d37f307

Please sign in to comment.