Sha256: 68886bba55f167b3db3ec4a9cfd10288136193e186531732045161b00858a2c7
Contents?: true
Size: 671 Bytes
Versions: 829
Compression:
Stored size: 671 Bytes
Contents
#!/bin/bash if [[ $PWN_ROOT == '' ]]; then if [[ ! -d '/pwn' ]]; then pwn_root=$(pwd) else pwn_root='/pwn' fi else pwn_root="${PWN_ROOT}" fi pwn_provider=`echo $PWN_PROVIDER` postgres_userland_root="${pwn_root}/etc/userland/${pwn_provider}/postgres" postgres_vagrant_yaml="${postgres_userland_root}/vagrant.yaml" user=`ruby -e "require 'yaml'; print YAML.load_file('${postgres_vagrant_yaml}')['user']"` pass=`ruby -e "require 'yaml'; print YAML.load_file('${postgres_vagrant_yaml}')['pass']"` create_user_cmd=$(cat << EOF create user ${user} with password '${pass}'; EOF ) sudo /bin/bash --login -c "echo ${create_user_cmd} | sudo -iu postgres psql"
Version data entries
829 entries across 829 versions & 1 rubygems