1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ##
# content of /etc/init/listener.conf
##
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /home/mk/log_listener
##
# content oh /home/mk/log_listener
##
#!/bin/sh
tail -F /var/log/vsftpd.log | while read line; do
if echo "$line" | grep -q 'OK UPLOAD:'; then
curl http://some.url/
fi
done
|