mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Use symlinks fix logic
This commit is contained in:
@@ -272,11 +272,11 @@ upgrade_postgres_if_needed() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
drop_vectors_everywhere "$CLUSTER_VERSION"
|
||||
|
||||
cp -n --preserve=mode "/var/postgresql-conf-tpl/postgresql.hdd.conf" /etc/postgresql/postgresql.conf
|
||||
sed -i "s@##PGDATA@$PGDATA@" /etc/postgresql/postgresql.conf
|
||||
|
||||
drop_vectors_everywhere "$CLUSTER_VERSION"
|
||||
|
||||
fix_permissions
|
||||
|
||||
bashio::log.info "Starting old Postgres ($CLUSTER_VERSION) to capture encoding/locale settings"
|
||||
@@ -326,7 +326,9 @@ upgrade_postgres_if_needed() {
|
||||
|
||||
main() {
|
||||
bashio::log.info "Checking for required PostgreSQL cluster upgrade before server start..."
|
||||
upgrade_postgres_if_needed
|
||||
if [ -f /config/database/PG_VERSION]; then
|
||||
upgrade_postgres_if_needed
|
||||
fi
|
||||
|
||||
start_postgres
|
||||
|
||||
|
||||
Reference in New Issue
Block a user