Skip to content

Commit 291dbd9

Browse files
author
Michael Watters
committed
Fix validation script to work with FreeBSD.
The validate_postgresql_connection.sh script was coded to rely on bash which is not available by default in FreeBSD. Updated script to use /bin/sh which is a valid POSIX shell.
1 parent 275e6f9 commit 291dbd9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

files/validate_postgresql_connection.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/sh
22

33
# usage is: validate_db_connection 2 50 psql
44

@@ -8,7 +8,9 @@ PSQL=$3
88

99
STATE=1
1010

11-
for (( c=1; c<=$TRIES; c++ ))
11+
c=1
12+
13+
while [ $c -le $TRIES ]
1214
do
1315
echo $c
1416
if [ $c -gt 1 ]
@@ -24,6 +26,7 @@ do
2426
then
2527
exit 0
2628
fi
29+
$c++
2730
done
2831

2932
echo 'Unable to connect to postgresql'

0 commit comments

Comments
 (0)