I would like to run a script on server side every time a user runs a git pull. However no hooks can achieve that, so I'm trying to find "hacks" to do so. Actually, I would also be happy to run the script "more often", for example every time a user connects through ssh.
I also want to do that as a non-root user (so I can't create new users), and I don't want to lose my hability to connect through regular ssh.
I tried to modify the bashrc file, but unfortunately the git protocol that uses ssh does not call this file. Any other idea?