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