[UPD] refactoring and new scripts
This commit is contained in:
8
vm-new-db.sh
Executable file
8
vm-new-db.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NAME=$1
|
||||
DB_NAME=$2
|
||||
|
||||
echo "### Create Db from Template"
|
||||
multipass exec $NAME -- sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER=ubuntu;"
|
||||
multipass exec $NAME -- sudo -u postgres psql -d $DB_NAME -f /home/ubuntu/db/zdc-template-db.sql
|
Reference in New Issue
Block a user