init_user-db.sh 296 B

12345678910
  1. #!/bin/bash
  2. set -e
  3. psql -v ON_ERROR_STOP=1 --username postgres <<-EOSQL
  4. CREATE USER nextcloud WITH PASSWORD 'xxxx';
  5. CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UNICODE';
  6. ALTER DATABASE nextcloud OWNER TO nextcloud;
  7. GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;
  8. EOSQL