I've attached a patch file, which adds a working push-hook to fossil. It's configured using the settings command/gui-page.

The client and server can be configured:

  *  client pattern: the pattern, which will be sent to the server can be configured on client side
  *  server pattern: the prefix of the client pattern, which will be accepted to start the hook can be configured on server side
  *  the executed command can be configured on server side. The pattern, sent by the client will be added to the command line