Skip to content

Instantly share code, notes, and snippets.

@lesstif
Last active September 16, 2022 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lesstif/688f6535cd44fb930dc1be56ef07c39e to your computer and use it in GitHub Desktop.
Save lesstif/688f6535cd44fb930dc1be56ef07c39e to your computer and use it in GitHub Desktop.
create postgresql database
#!/usr/bin/env bash
# list of users create DB
users="jira confluence bitbucket bamboo jsm"
for u in ${users}; do
createuser ${u} --createdb --no-superuser --no-createrole;
createdb ${u}db -O ${u} --encoding='UTF-8' --locale=en_US.UTF-8 --template=template0;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment