I'm pretty sure this script is broken. It gives the illusion of working, but it's not actually backing up the database.

I believe the actual last line of the script should be:
su $DATABASE_ADMIN -c "pg_dump -Fc -f $OUTPUT_DIRECTORY/$DATABASE.$DATE.pg_dump $DATABASE"
for it to work.
I also think that you should get rid of the first line "#!sh" since that also won't work.
Am I misunderstanding something?