From 6c19b0ceb333aab54648d65214f8b8019eed5d95fc8a107d07a5d8830172ad40 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Sun, 17 Jun 2018 15:30:45 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth?expand=0&rev=6 --- openSUSE_gnuhealth_setup | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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