From 19ef3eb8aa221aab4ed67769e60049797674ec92 Mon Sep 17 00:00:00 2001 From: 3V3RYONE Date: Tue, 25 Jan 2022 20:24:14 +0530 Subject: [PATCH] delete extra parameter in msfdb --- lib/msfdb_helpers/db_interface.rb | 3 ++- lib/msfdb_helpers/pg_ctl.rb | 2 +- msfdb | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msfdb_helpers/db_interface.rb b/lib/msfdb_helpers/db_interface.rb index b9369052a3..5c826b049a 100644 --- a/lib/msfdb_helpers/db_interface.rb +++ b/lib/msfdb_helpers/db_interface.rb @@ -64,8 +64,9 @@ module MsfdbHelpers if @options[:debug] puts "psql -h #{Dir.tmpdir} -p #{@options[:db_port]} -c \"#{cmd};\" #{db_name}" end - + run_cmd("psql -h #{Dir.tmpdir} -p #{@options[:db_port]} -c \"#{cmd};\" #{db_name}") end + end end diff --git a/lib/msfdb_helpers/pg_ctl.rb b/lib/msfdb_helpers/pg_ctl.rb index f150adeba1..5c16d140a9 100644 --- a/lib/msfdb_helpers/pg_ctl.rb +++ b/lib/msfdb_helpers/pg_ctl.rb @@ -15,7 +15,7 @@ module MsfdbHelpers puts "Creating database at #{@db}" Dir.mkdir(@db) run_cmd("initdb --auth-host=trust --auth-local=trust -E UTF8 #{@db.shellescape}") - + File.open("#{@db}/postgresql.conf", 'a') do |f| f.puts "port = #{@options[:db_port]}" f.puts "unix_socket_directories = \'#{Dir.tmpdir}\'" diff --git a/msfdb b/msfdb index 078da0f014..1f6f3a3030 100755 --- a/msfdb +++ b/msfdb @@ -67,7 +67,6 @@ require 'msfenv' db_host: '127.0.0.1', db_port: 5433, db_pool: 200, - unix_socket_directories: '/tmp', address: 'localhost', port: 5443, daemon: true,