db_pw=$(cat /etc/pleroma/config.exs | grep password | sed 's/[ ]*password\: *//g' | sed 's/,//g' | sed 's/"//g')
elif [ "${app}" = "peertube" ]; then
db_pw=$(cat /var/www/peertube/config/production.yaml | grep password | head -1 | sed "s/[ ]*password\: *//g" | sed "s/'//g")
fi
su postgres -lc "psql -c \"ALTER USER ${app} WITH PASSWORD '${db_pw}';\""
db_pw=$(cat /etc/pleroma/config.exs | grep password | sed 's/[ ]*password\: *//g' | sed 's/,//g' | sed 's/"//g')
elif [ "${app}" = "peertube" ]; then
db_pw=$(cat /var/www/peertube/config/production.yaml | grep password | head -1 | sed "s/[ ]*password\: *//g" | sed "s/'//g")
fi
su postgres -lc "psql -c \"ALTER USER ${app} WITH PASSWORD '${db_pw}';\""