Skip to content

Commit 514b5b7

Browse files
committed
add location for pgpass with 10.0
1 parent 228ff5d commit 514b5b7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/splunkconf-backup-test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,19 +307,23 @@ jobs:
307307
docker exec --user ${SPLUNK_USER} splunk bash -c \
308308
"ps aux 2>/dev/null | grep -i [p]ostgres | grep -v grep || echo '❌ Error : No Postgres process found'" || true
309309
echo "Waiting 60s and redoing test"
310-
sleep 60
310+
sleep 10
311311
docker exec --user ${SPLUNK_USER} splunk bash -c \
312312
"ps aux 2>/dev/null | grep -i [p]ostgres | grep -v grep || echo '❌ Error : No Postgres process found'" || true
313313
# Check if .pgpass file exists (indicates Postgres credentials are configured)
314314
echo ""
315315
echo "--- Checking for Postgres credentials file ---"
316316
if docker exec --user ${SPLUNK_USER} splunk test -f ${SPLUNK_HOME}/var/packages/data/postgres/.pgpass 2>/dev/null; then
317+
# location for splunk 10.2
317318
PGPASS_FILE="${SPLUNK_HOME}/var/packages/data/postgres/.pgpass"
318-
echo "Found .pgpass in packages/data/postgres directory"
319+
echo "Found .pgpass at ${PGPASS_FILE}"
320+
elif docker exec --user ${SPLUNK_USER} splunk test -f ${SPLUNK_HOME}/var/packages/data/postgres/db/.pgpass 2>/dev/null; then
321+
# location for splunk 10.0
322+
PGPASS_FILE="${SPLUNK_HOME}/var/packages/data/postgres/db/.pgpass"
323+
echo "Found .pgpass at ${PGPASS_FILE}"
319324
else
320325
docker exec --user ${SPLUNK_USER} splunk bash -c \
321326
"find /opt/splunk -name .pgpass 2>/dev/null || echo '❌ Error : No .pgpass found via find command '" || true
322-
echo "❌ ERROR No .pgpass file found"
323327
exit 1
324328
fi
325329

0 commit comments

Comments
 (0)