From 573fb9858c7ab4e418b7c100b356200b7582eddf Mon Sep 17 00:00:00 2001 From: Reditus Date: Thu, 14 May 2026 06:27:30 +0100 Subject: [PATCH] add scripts/db_check.py for database connection test --- scripts/db_check.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 scripts/db_check.py diff --git a/scripts/db_check.py b/scripts/db_check.py new file mode 100644 index 0000000..7e42eb7 --- /dev/null +++ b/scripts/db_check.py @@ -0,0 +1,7 @@ +import sys, psycopg2 +try: + c = psycopg2.connect(host='localhost', port=int(sys.argv[1]), user='postgres', password='postgres', dbname='dune', connect_timeout=3) + c.close() + print('ok') +except: + pass \ No newline at end of file