Server wide post receive git hook to run bash script on server machine

I know I can set up a webhooks for server/organization wide post-receive hook. But what I have is a rsync backup bash script to be run on the same server running gitea. Currently it just runs a cron job once a day but I’d rather it run any time any repo commit is pushed to the gitea server.

Is it possible (one hook for server wide)? as opposed to a webhook If so how? I didn’t see anything in the docs.

Alternatively a hack would be to add the same post-receive git hook to every existing and new repo which I guess would effectively be the same. That’s not practical to do manually.

you could use global git hooks (https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook),but make sure that gitea’s githooks are also still run when you do that. the global githooks would need to be setup for the user running gitea on your server.