[fix] Role already exists

This commit is contained in:
ljf 2016-12-14 14:13:13 +01:00
parent d27dc888f2
commit 4c48a7798c

View file

@ -75,8 +75,8 @@ else
sudo cp -R "$DESTDIR." /usr/ sudo cp -R "$DESTDIR." /usr/
sudo rm -Rf $DESTDIR sudo rm -Rf $DESTDIR
ynh_psql_create_db $APPNAME $APPNAME "$dbpass"
ynh_psql_execute_as_root "ALTER USER $APPNAME WITH CREATEDB;" ynh_psql_execute_as_root "ALTER USER $APPNAME WITH CREATEDB;"
sudo su -c "createdb -O $APPNAME $APPNAME" - postgres
# Set admin password # Set admin password
# TODO Support @ in password # TODO Support @ in password