1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/noalyss_ynh.git synced 2024-09-03 19:46:20 +02:00

[fix] su instead of sudo

This commit is contained in:
Laurent Peuch 2015-09-27 23:56:22 +02:00
parent a66d859667
commit 5bcaf91f8c

View file

@ -38,7 +38,7 @@ 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')
sudo -i -u postgres -c "echo \"$db_pwd\n$db_pwd\" | createuser -P -S -R --createdb noalyss"
su postgres -c "echo \"$db_pwd\n$db_pwd\" | createuser -P -S -R --createdb noalyss"
sed -i "s@DATABASE_PASSWORD@$db_pwd@g" ../conf/noalyss.conf
finalphpconf=/etc/php5/fpm/pool.d/noalyss.conf