Add postgres cli support.

This commit is contained in:
Kevin Baensch 2023-01-05 09:48:19 +01:00
parent 9083bfc5ad
commit 264cf17de5
3 changed files with 28 additions and 23 deletions

View file

@ -18,7 +18,7 @@ label_hook() {
if [ "${LOCAL_DB_TYPE}" = "mysql" ]
then
LOCAL_DB_PORT='3306'
elif [ "${LOCAL_DB_TYPE}" = "psql" ]
elif [ "${LOCAL_DB_TYPE}" = "postgres" ]
then
LOCAL_DB_PORT='5432'
fi
@ -26,7 +26,7 @@ label_hook() {
}
template_hook() {
if [ "$(jq '((.type == "mysql") or (.type == "psql")) and (.host != "")' <<< "${PARTIAL_RESULT}" 2> /dev/null)" = true ]
if [ "$(jq '((.type == "mysql") or (.type == "postgres")) and (.host != "")' <<< "${PARTIAL_RESULT}" 2> /dev/null)" = true ]
then
return 0
fi