aports/testing/lemmy/fix-db-init-script.patch
Celeste f73c6bb467 testing/lemmy: new aport
https://github.com/LemmyNet/lemmy
Link aggregator and forum for the Fediverse
2023-07-30 15:58:13 +00:00

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