I'm attempting to create a script to chmod the repo files to a new group after a push occurs. To test hooks, I created a hook that creates a file in /tmp/ just to check that the hook is working. It is not however.
What I've done so far:
First I created a script (~/.gitolite/hooks/common/update.secondary), then ran gl-setup [pubkey]. After numerous tries doing this, I checked the main hooks directory (/var/gitolite/hook/common/) and the script was not there.
After that I put the script directly in /var/gitolite/hook/common/, ran gl-setup again, and it still did not run the hook.
The script executes fine as the gitolite user using
sh ~/repositories/[some project]/hooks/myscript
The script I'm using:
#!/bin/bash
touch /tmp/TESTFILE
The permission update script:
#!/bin/bash
chmod 750 -R /home/git/repositories/*