Skip to content

Instantly share code, notes, and snippets.

@mattpwest
Created May 17, 2018 10:17
Show Gist options
  • Save mattpwest/6b90ad0e2b3d1cb19140481d82f977a2 to your computer and use it in GitHub Desktop.
Save mattpwest/6b90ad0e2b3d1cb19140481d82f977a2 to your computer and use it in GitHub Desktop.
Bash alternative to Ansible PostgreSQL commands
#!/bin/bash
createuser sonar;
echo "ALTER USER sonar WITH ENCRYPTED password '$1'; CREATE DATABASE sonar OWNER sonar; \q" | psql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment