From e4d3f4704b97db8448558ceabea768836c313cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Mon, 31 Oct 2016 15:46:37 +0100 Subject: [PATCH] more packager.io fixe (#339) - fix postgresql package name for sles12 - configure postgresql on centos to accept username/password logins --- .pkgr.yml | 2 +- contrib/packager.io/postinstall.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.pkgr.yml b/.pkgr.yml index c2c3178ac..ea7cce21e 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -19,7 +19,7 @@ targets: sles-12: dependencies: - nginx - - postgresql + - postgresql-server before: - uname -a - ruby -v diff --git a/contrib/packager.io/postinstall.sh b/contrib/packager.io/postinstall.sh index 86561ac5c..3dee19124 100755 --- a/contrib/packager.io/postinstall.sh +++ b/contrib/packager.io/postinstall.sh @@ -40,8 +40,17 @@ else echo "preparing postgresql server" postgresql-setup initdb + echo "backuping postgres config" + test -f /var/lib/pgsql/data/pg_hba.conf.bak || cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bak + + "allow login via username and password in postgresql" + egrep -v "^#.*$" < /var/lib/pgsql/data/pg_hba.conf.bak | sed 's/ident/trust/g' > /var/lib/pgsql/data/pg_hba.conf + echo "restarting postgresql server" ${INIT_CMD} restart postgresql + + echo "create postgresql bootstart" + ${INIT_CMD} enable postgresql.service fi # create database