forked from GNUsocial/gnu-social
[TOOLS] Improve configure script to disallow reserved database names
This commit is contained in:
parent
a8cd9034ff
commit
d5fa31a6f5
16
bin/configure
vendored
16
bin/configure
vendored
@ -7,23 +7,15 @@ done
|
|||||||
|
|
||||||
cd "${git_dir}" || exit
|
cd "${git_dir}" || exit
|
||||||
|
|
||||||
if [ -e ./docker/bootstrap/bootstrap.env ]; then
|
. ./docker/bootstrap/bootstrap.env
|
||||||
. ./docker/bootstrap/bootstrap.env
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO Add configuration
|
|
||||||
cp docker-compose.yaml.in docker-compose.yaml
|
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
printf "DBMS (postgres|mariadb): " && read -r dbms
|
printf "DBMS (postgres|mariadb): " && read -r dbms
|
||||||
echo "${dbms}" | grep -Eq 'postgres|mariadb' && break
|
[ $(echo "${dbms}" | grep -E 'postgres|mariadb') ] && break
|
||||||
done
|
|
||||||
|
|
||||||
while :; do
|
|
||||||
printf "Social database name: " && read -r db
|
|
||||||
echo "${db}" | grep -vEq 'postgres' && break
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
printf "Social database name: " && read -r db
|
||||||
[ "${dbms}" = 'mariadb' ] && printf "Database user: " && read -r user
|
[ "${dbms}" = 'mariadb' ] && printf "Database user: " && read -r user
|
||||||
printf "Database password: " && read -r password
|
printf "Database password: " && read -r password
|
||||||
printf "Sitename: " && read -r sitename
|
printf "Sitename: " && read -r sitename
|
||||||
@ -32,7 +24,7 @@ printf "Admin password: " && read -r admin_password
|
|||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
printf "Site profile (public|private|community|single_user): " && read -r profile
|
printf "Site profile (public|private|community|single_user): " && read -r profile
|
||||||
echo "${profile}" | grep -Eq 'public|private|community|single_user' && break
|
[ $(echo "${profile}" | grep -E 'public|private|community|single_user') ] && break
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p ./docker/db
|
mkdir -p ./docker/db
|
||||||
|
Loading…
x
Reference in New Issue
Block a user