[UPD] refactoring and db creation update
This commit is contained in:
10
vm-db-create.sh
Executable file
10
vm-db-create.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/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-db-dump.sql
|
||||
multipass exec $NAME -- mkdir -p /home/ubuntu/.local/share/Odoo/filestore/$DB_NAME
|
||||
multipass exec $NAME -- unzip /home/ubuntu/db/zdc-db-filestore.zip -d /home/ubuntu/.local/share/Odoo/filestore/$DB_NAME
|
Reference in New Issue
Block a user