The code provides in backing up the globals by means of pg_dumpall -g
The wiki says i need to ask for editing privileges.
My username is Wbloos
BTW nice script. And it could yet be expanded with support for multiple clusters. There is some possible example code in Debian's postgresql-common pg_lsclusters, which is written in perl.