Update owncloud.sh

Updated pgsql configurations and added database autoconfiguration for Owncloud.