Skip to content

Commit

Permalink
Provided autorun and extended readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans committed May 7, 2020
1 parent 4a2423e commit abd39b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ The default is port `5432`

__Securiy Notice!__

The default username is `postgres` with an __empty password__.
The default username is `postgres` with password `homeassistant`.
Make sure you change this immediately after activating the add-on:

```
Expand Down
8 changes: 4 additions & 4 deletions timescaledb/rootfs/etc/services.d/postgres/run
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ postgres_pid=$!
bashio::log.info "done"

# Wait for postgres to become availale..
sleep 3
#while ! psql -U "postgres" postgres -c "SELECT 1;" 2> /dev/null; do
# sleep 1
#done
while ! psql -U "postgres" postgres -c "" 2> /dev/null; do
sleep 1
done

# Create extensions timescaledb in initial databases
if bashio::var.true "${new_install}"; then
psql -U "postgres" postgres -c "ALTER USER postgres WITH PASSWORD 'homeassistant';"
psql -U "postgres" postgres -c "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;"
psql -U "postgres" template1 -c "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;"
fi
Expand Down

0 comments on commit abd39b5

Please sign in to comment.