Explorar el Código

Port missing postgesql connection

+ Fixed missing '
Jaap Marcus hace 5 años
padre
commit
62afd94404
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      bin/v-add-database-host
  2. 2 2
      func/db.sh

+ 1 - 1
bin/v-add-database-host

@@ -99,7 +99,7 @@ case $type in
     pgsql) str="HOST='$host' USER='$dbuser' PASSWORD='$dbpass'";
            str="$str CHARSETS='$charsets' TPL='$template' MAX_DB='$max_db'";
            str="$str U_SYS_USERS='' U_DB_BASES='0' SUSPENDED='no'";
-           str="$str TIME='$time' DATE='$date' PORT='$port";;
+           str="$str TIME='$time' DATE='$date' PORT='$port'";;
 esac
 
 

+ 2 - 2
func/db.sh

@@ -109,8 +109,8 @@ psql_connect() {
         log_event "$E_PARSING" "$ARGUMENTS"
         exit $E_PARSING
     fi
-
-    psql -h $HOST -U $USER -c "SELECT VERSION()" > /dev/null 2>/tmp/e.psql
+    
+    psql -h $HOST -U $USER -p $PORT -c "SELECT VERSION()" > /dev/null 2>/tmp/e.psql
     if [ '0' -ne "$?" ]; then
         if [ "$notify" != 'no' ]; then
             echo -e "Can't connect to PostgreSQL $HOST\n$(cat /tmp/e.psql)" |\