diff --git a/openSUSE_gnuhealth_setup b/openSUSE_gnuhealth_setup index 3fddb4c..d26bd56 100644 --- a/openSUSE_gnuhealth_setup +++ b/openSUSE_gnuhealth_setup @@ -24,12 +24,18 @@ # ############################################################################## +#----------------------------------------------------------------------------- +# Change log +#----------------------------------------------------------------------------- +# V 0.2 20180617 Axel Replace tryton with ${DB_USER} + + #----------------------------------------------------------------------------- # Variables declaration #----------------------------------------------------------------------------- #GNU Health installer for openSUSE version -VERSION="0.1" +VERSION="0.2" # Colors constants NONE="$(tput sgr0)" @@ -124,13 +130,13 @@ echo "Postgres trust method changed" echo "Create database user" #create user -sudo -u postgres psql -c "CREATE USER tryton WITH CREATEDB;" || bailout +sudo -u postgres psql -c "CREATE USER ${DB_USER} WITH CREATEDB;" echo "Database user created" echo "Creating database ${DB_NAME}" # create database -sudo -u postgres createdb ${DB_NAME} --encoding='UTF8' --owner=tryton || bailout +sudo -u postgres createdb ${DB_NAME} --encoding='UTF8' --owner=${DB_USER} || bailout echo "Database created" #exit as postgres