You forget $pidfile and $PGPOOLUSER and some more comments.
Check script in attach. I'm tested in my centos-6 and pgpool-II-92.