Skip to content

Commit

Permalink
Always apply data directory permissions after snapshot restore. Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans committed Aug 27, 2020
1 parent 73eafd8 commit bbf3332
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions timescaledb/rootfs/etc/services.d/postgres/run
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ if ! bashio::fs.directory_exists "${postgres_data}"; then
# Create postgress directory in data directory
new_install=true
mkdir -p ${postgres_data}
chown -R postgres:postgres ${postgres_data}
chmod 700 ${postgres_data}
else
bashio::log.info "Using existing PostgreSQL installation.."
fi
# Always re-apply permissions, because they seem to be reset after a snapshot restore
chown -R postgres:postgres ${postgres_data}
chmod 700 ${postgres_data}

# Initialize for new installs
if bashio::var.true "${new_install}"; then
Expand Down

0 comments on commit bbf3332

Please sign in to comment.