mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-08 16:45:56 +02:00
Use same shell
This commit is contained in:
@@ -38,5 +38,5 @@
|
|||||||
"slug": "postgres",
|
"slug": "postgres",
|
||||||
"udev": true,
|
"udev": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/postgres",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/postgres",
|
||||||
"version": "15.7-28"
|
"version": "15.7-29"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ fi
|
|||||||
|
|
||||||
bashio::log.info "Waiting for PostgreSQL to start..."
|
bashio::log.info "Waiting for PostgreSQL to start..."
|
||||||
|
|
||||||
|
( bashio::net.wait_for 5432 localhost 900
|
||||||
|
|
||||||
# Set PostgreSQL connection variables
|
# Set PostgreSQL connection variables
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
DB_HOSTNAME=localhost
|
DB_HOSTNAME=localhost
|
||||||
@@ -69,8 +71,6 @@ if bashio::config.has_value "POSTGRES_USER"; then
|
|||||||
fi
|
fi
|
||||||
export DB_PORT DB_HOSTNAME DB_USERNAME DB_PASSWORD
|
export DB_PORT DB_HOSTNAME DB_USERNAME DB_PASSWORD
|
||||||
|
|
||||||
( bashio::net.wait_for 5432 localhost 900
|
|
||||||
|
|
||||||
until pg_isready -h "$DB_HOSTNAME" -p "$DB_PORT" -U "$DB_USERNAME" >/dev/null 2>&1; do
|
until pg_isready -h "$DB_HOSTNAME" -p "$DB_PORT" -U "$DB_USERNAME" >/dev/null 2>&1; do
|
||||||
echo "PostgreSQL is starting up..."
|
echo "PostgreSQL is starting up..."
|
||||||
sleep 2
|
sleep 2
|
||||||
@@ -81,7 +81,6 @@ done
|
|||||||
###############################
|
###############################
|
||||||
|
|
||||||
update_postgres() {
|
update_postgres() {
|
||||||
|
|
||||||
# Read the previous PostgreSQL version from file
|
# Read the previous PostgreSQL version from file
|
||||||
OLD_PG_VERSION=$(cat "$PG_VERSION_FILE" 2>/dev/null || echo "$PG_MAJOR_VERSION")
|
OLD_PG_VERSION=$(cat "$PG_VERSION_FILE" 2>/dev/null || echo "$PG_MAJOR_VERSION")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user