mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 20:46:39 +02:00
26 lines
711 B
Diff
26 lines
711 B
Diff
--- a/scripts/db-init.sh
|
|
+++ b/scripts/db-init.sh
|
|
@@ -1,4 +1,4 @@
|
|
-#!/usr/bin/env bash
|
|
+#!/bin/sh
|
|
set -e
|
|
|
|
# Default configurations
|
|
@@ -43,7 +43,7 @@
|
|
do
|
|
read -p "Database name: " dbname
|
|
read -p "Username: " username
|
|
- read -p "Password: password"
|
|
+ read -p "Password: " password
|
|
read -p "Port: " port
|
|
#echo
|
|
|
|
@@ -68,7 +68,7 @@
|
|
|
|
ask_for_db_config
|
|
|
|
-psql -c "CREATE USER $username WITH PASSWORD '$password' SUPERUSER;" -U postgres
|
|
+psql -c "CREATE USER $username WITH PASSWORD '$password';" -U postgres
|
|
psql -c "CREATE DATABASE $dbname WITH OWNER $username;" -U postgres
|
|
export LEMMY_DATABASE_URL=postgres://$username:$password@localhost:$port/$dbname
|
|
|