From 07352d955eb905ddc1a195fd48d73642617a638b Mon Sep 17 00:00:00 2001 From: Stevan Date: Fri, 7 Feb 2025 23:38:10 +0000 Subject: [PATCH] docs: update connection string to sslmode=require --- bin/sokwedb-user-add.m4 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/sokwedb-user-add.m4 b/bin/sokwedb-user-add.m4 index f9167ad..80d1fc3 100644 --- a/bin/sokwedb-user-add.m4 +++ b/bin/sokwedb-user-add.m4 @@ -2,6 +2,7 @@ # Copyright (C) 2012, 2023, 2025 The Meme Factory, Inc. # http://www.karlpinc.com/ # Copyright (C) 2005, 2008, 2011 Karl O. Pinc +# Copyright (C) 2025 Stevan R. Earl # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -45,6 +46,7 @@ echo ' group The group in which to put the user' } # Parse command line +export CONNECTIONSTRING='sslmode=require' export ADMIN='' export DEV='' export AZURE='yes' @@ -65,13 +67,14 @@ while [ "$A_ADMINUSER" = '-a' \ AZURE="no" shift elif [ "$A_ADMINUSER" = '-h' ] ; then - HOSTARGS="--host $2" + CONNECTIONSTRING="$CONNECTIONSTRING host=$2" shift 2 elif [ "$A_ADMINUSER" = '--help' ] ; then usage exit 0 fi A_ADMINUSER=$1 + CONNECTIONSTRING="$CONNECTIONSTRING user=$1" done export A_USER=$2 export A_GROUP=$3 @@ -97,7 +100,7 @@ if [ "$AZURE" = 'yes' ] ; then fi if [ -n "$ADMIN" ] ; then - psql $HOSTARGS -U $A_ADMINUSER -d template1 <