Welcome! Log In Create A New Profile

Advanced

Re: trigger a git commit for static site generator

August 09, 2012 06:42PM
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' |awk
> ....

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

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"; //
do
echo $x;
#~ git commit -m "Hello Igor";
done

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

http://stackoverflow.com/questions/420143/making-git-auto-commit
Subject Author Posted

trigger a git commit for static site generator

klml August 08, 2012 05:58PM

Re: trigger a git commit for static site generator

Justin Dorfman August 08, 2012 06:46PM

Re: trigger a git commit for static site generator

klml August 09, 2012 06:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready