From dd446216b29bc26136158478db28e633b51afaf3 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 28 Sep 2015 00:15:35 +0200 Subject: [PATCH] [fix] script is runned by admin --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 9639d75..6494c56 100644 --- a/scripts/install +++ b/scripts/install @@ -38,8 +38,8 @@ sed -i "s@NAMETOCHANGE@noalyss@g" ../conf/php-fpm.conf db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') -su postgres -c "createuser -S -R --createdb noalyss" -su postgres -c "psql -c \"ALTER USER noalyss with PASSWORD \'$db_pwd\';\"" +sudo -u postgres createuser -S -R --createdb noalyss +sudo -u postgres psql -c "ALTER USER noalyss with PASSWORD '$db_pwd';" sed -i "s@DATABASE_PASSWORD@$db_pwd@g" ../conf/noalyss.conf finalphpconf=/etc/php5/fpm/pool.d/noalyss.conf