Skip to content

Instantly share code, notes, and snippets.

@kurobeats
Last active August 29, 2015 14:21
Show Gist options
  • Save kurobeats/37148be746d5a8dc2dd3 to your computer and use it in GitHub Desktop.
Save kurobeats/37148be746d5a8dc2dd3 to your computer and use it in GitHub Desktop.
A script to start postgres and msf, because I'm lazy
#!/usr/bin/env bash
# Check to ensure the script is run as root/sudo
if [ "$(id -u)" != "0" ];
then
echo "You are not root! Y u do dis?!" 1>&2
exit 1
fi
systemctl start postgresql.service
msfconsole --quiet -x "db_connect ${USER}@msf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment