trigger a git commit for static site generator

klml nginx-forum at
Thu Aug 9 22:42:30 UTC 2012

Hi Justin,

thank you for this answer

> ... (and can be dangerous IMO):
> x="`tail -f /usr/local/nginx/logs/access.log |grep PUT |sed 's/["]//g'
> ....

using tail on logs for this is very freaky;) but its a thinkable

To get only PUT requests I used an extra PUT log in the nginx config:

        if ($request_method = PUT) {
            access_log /var/log/nginx/accessPUT.log;

so I dont need to grep.

Unfortunately I dont "get over" the forced tail

x="`tail -f /var/log/nginx/accessPUT.log`";
c="PUT"          //to start an endless loop
while c="PUT";   //
echo $x;
 #~ git commit -m "Hello Igor";

gave me noting, I expected the lines from the log.

At the moment I use, not-out-of-the-box;(, inotifywait but this works ;)
But I will think more about tail

Posted at Nginx Forum:,229477,229546#msg-229546

More information about the nginx mailing list