OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth?expand=0&rev=6
This commit is contained in:
parent
eb7c788def
commit
c28611211b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user