Skip to content

Commit 1c86d14

Browse files
authored
v1.0.2 (#3)
Major update * Adding a working healthcheck
1 parent a36bfd1 commit 1c86d14

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.0.2

overlay/usr/local/bin/healthcheck

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ export BF_E=`basename ${0}`
1111
# Modifications copyright (c) 2021 bfren
1212
#======================================================================================================================
1313

14-
USERNAME=${POSTGRESQL_USERNAME:-root}
15-
PASSWORD=${POSTGRESQL_PASSWORD:-${POSTGRESQL_ROOT_PASSWORD}}
16-
17-
CHECK="$(echo 'SELECT 1;' | mariadb -h127.0.0.1 -u${USERNAME} -p${PASSWORD} 2>/dev/null | head -n1)"
14+
CHECK=$(psql -U postgres -c "SELECT 1;" 2>/dev/null | tail -n3 | head -n1)
1815

1916
[[ "${CHECK}" == "1" ]] && exit 0
2017
exit 1

0 commit comments

Comments
 (0)