Skip to content

Commit

Permalink
Land #26, Kali database.yml check for msfwrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
wvu committed Sep 18, 2015
2 parents dfda7c7 + 5e43136 commit ba405f6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions config/templates/metasploit-framework-wrappers/msfwrapper.erb
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,14 @@ if [ -n "`find $FRAMEWORK/$cmd -mmin +20160`" ]; then
echo " Consider running 'msfupdate' to update to the latest version."
fi

# Skip initialization if we're root
if [ "`id -u`" -gt 0 ]; then
init
# If we are on an updated Kali system, try to use the system database
if [ -e /usr/share/metasploit-framework/config/database.yml \
-a ! -e $LOCALCONF/database.yml ]; then
cmd="$cmd -y /usr/share/metasploit-framework/config/database.yml"
else # Skip initialization if we're root
if [ "`id -u`" -gt 0 ]; then
init
fi
fi

# Uncomment to enable libedit support
Expand Down

0 comments on commit ba405f6

Please sign in to comment.