Mercurial > lada > lada-server
changeset 854:e797391714a0
Allow setting variables via commandline.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 02 Feb 2016 15:03:29 +0100 |
parents | 2ce24e2baf20 |
children | 0e895f13f0b6 |
files | db_schema/setup-db.sh |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/db_schema/setup-db.sh Thu Jan 28 12:16:23 2016 +0100 +++ b/db_schema/setup-db.sh Tue Feb 02 15:03:29 2016 +0100 @@ -1,9 +1,9 @@ #!/bin/sh DIR=`dirname $0` -ROLE_NAME=lada -ROLE_PW=lada -DB_NAME=lada +ROLE_NAME=${1:-lada} +ROLE_PW=${2:-$ROLE_NAME} +DB_NAME=${3:-$ROLE_NAME} psql --command "CREATE USER $ROLE_NAME PASSWORD '$ROLE_PW';" createdb -E UTF-8 $DB_NAME