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
|
# Variables declaration
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#GNU Health installer for openSUSE version
|
#GNU Health installer for openSUSE version
|
||||||
VERSION="0.1"
|
VERSION="0.2"
|
||||||
|
|
||||||
# Colors constants
|
# Colors constants
|
||||||
NONE="$(tput sgr0)"
|
NONE="$(tput sgr0)"
|
||||||
@ -124,13 +130,13 @@ echo "Postgres trust method changed"
|
|||||||
|
|
||||||
echo "Create database user"
|
echo "Create database user"
|
||||||
#create 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 "Database user created"
|
||||||
|
|
||||||
echo "Creating database ${DB_NAME}"
|
echo "Creating database ${DB_NAME}"
|
||||||
# create database
|
# 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"
|
echo "Database created"
|
||||||
#exit as postgres
|
#exit as postgres
|
||||||
|
Loading…
Reference in New Issue
Block a user