mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-03 15:44:58 +02:00
vchord
This commit is contained in:
@@ -150,16 +150,16 @@ EOF
|
|||||||
bashio::log.info "Database setup completed successfully."
|
bashio::log.info "Database setup completed successfully."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to check if vectorchord extension is enabled
|
# Function to check if vchord extension is enabled
|
||||||
check_vectorchord_extension() {
|
check_vchord_extension() {
|
||||||
echo "Checking if 'vectorchord' extension is enabled..."
|
echo "Checking if 'vchord' extension is enabled..."
|
||||||
RESULT=$(psql "postgres://$DB_USERNAME:$DB_PASSWORD@$DB_HOSTNAME:$DB_PORT" -tAc "SELECT extname FROM pg_extension WHERE extname = 'vectorchord';")
|
RESULT=$(psql "postgres://$DB_USERNAME:$DB_PASSWORD@$DB_HOSTNAME:$DB_PORT" -tAc "SELECT extname FROM pg_extension WHERE extname = 'vchord';")
|
||||||
|
|
||||||
if [[ "$RESULT" == "vectorchord" ]]; then
|
if [[ "$RESULT" == "vchord" ]]; then
|
||||||
echo "✅ 'vectorchord' extension is enabled."
|
echo "✅ 'vchord' extension is enabled."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
bashio::log.warning "❌ 'vectorchord' extension is NOT enabled."
|
bashio::log.warning "❌ 'vchord' extension is NOT enabled."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -185,4 +185,4 @@ export_db_env
|
|||||||
|
|
||||||
setup_root_user
|
setup_root_user
|
||||||
setup_database
|
setup_database
|
||||||
check_vectorchord_extension
|
check_vchord_extension
|
||||||
|
|||||||
Reference in New Issue
Block a user