mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Update 99-run.sh
This commit is contained in:
@@ -39,8 +39,7 @@ if [[ "$DATABASE_URL" == *"localhost"* ]]; then
|
|||||||
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'homeassistant';"
|
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'homeassistant';"
|
||||||
|
|
||||||
# Create database if does not exist
|
# Create database if does not exist
|
||||||
echo "CREATE ROLE postgres WITH LOGIN SUPERUSER CREATEDB CREATEROLE PASSWORD 'homeassistant';
|
echo "CREATE DATABASE linkwarden; GRANT ALL PRIVILEGES ON DATABASE linkwarden to postgres;
|
||||||
CREATE DATABASE linkwarden; CREATE USER postgres WITH ENCRYPTED PASSWORD 'homeassistant'; GRANT ALL PRIVILEGES ON DATABASE linkwarden to postgres;
|
|
||||||
\q"> setup_postgres.sql
|
\q"> setup_postgres.sql
|
||||||
sudo -u postgres psql "postgres://postgres:homeassistant@localhost:5432" < setup_postgres.sql || true
|
sudo -u postgres psql "postgres://postgres:homeassistant@localhost:5432" < setup_postgres.sql || true
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user