Skip to content

Commit

Permalink
Merge pull request #93 from zalando/feature/ensure_logfiles_exist
Browse files Browse the repository at this point in the history
Ensure postgresql logfiles all exist
  • Loading branch information
feikesteenbergen committed Sep 13, 2016
2 parents b362fb6 + fb7a0c9 commit 87861f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions postgres-appliance/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if [ $? -ne 1 ]; then echo "ERROR: Supervisord is already running"; exit 1; fi
mkdir -p "$PGROOT" && chown -R postgres:postgres "$PGROOT"
mkdir -p "$PGLOG" && chown -R postgres:postgres "$PGLOG"

## Ensure all logfiles exist, most appliances will have
## a foreign data wrapper pointing to these files
for i in $(seq 0 7); do touch "${PGLOG}/postgresql-$i.csv"; done

python3 /configure_spilo.py all
(
sudo PATH="$PATH" -u postgres /patroni_wait.sh -t 3600 -- /postgres_backup.sh "$WALE_ENV_DIR" "$PGDATA"
Expand Down

0 comments on commit 87861f7

Please sign in to comment.