I'm using Incrond to check a folder for file changes which triggers a Rsync job to our storage server. This configuration is deployed through Puppet, and therefore would like to use the $HOSTNAME variable in the destination path so it writes to it's own directory.
/path/to/backup/ IN_CLOSE_WRITE,IN_CREATE,IN_MODIFY,IN_MOVED_TO,IN_CLOSE_NOWRITE /usr/bin/rsync -t --password-file=/etc/rsyncd.secrets /path/to/backup/$# rsync://rsync@STORAGESERVER/storage/$HOSTNAME/backup/$#
However, this hostname variable is not available in Incrond; and just passes "hostname" into the rsync path.
How can I get the $HOSTNAME variable to work in Incrond?