mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Addition of vectochord
This commit is contained in:
@@ -164,6 +164,20 @@ check_vector_extension() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to check if vchord extension is enabled
|
||||
check_vchord_extension() {
|
||||
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 = 'vchord';")
|
||||
|
||||
if [[ "$RESULT" == "vchord" ]]; then
|
||||
echo "✅ 'vchord' extension is enabled."
|
||||
exit 0
|
||||
else
|
||||
bashio::log.warning "❌ 'vchord' extension is NOT enabled."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
#########################
|
||||
# Main script execution #
|
||||
#########################
|
||||
@@ -185,4 +199,4 @@ export_db_env
|
||||
|
||||
setup_root_user
|
||||
setup_database
|
||||
check_vector_extension
|
||||
check_vchord_extension || check_vector_extension
|
||||
|
||||
Reference in New Issue
Block a user