fix lxc-ps usage with -C arg for lxc 0.7.5
[sysadmin-cookbook] / recepies / gearman / grep_logs.sh
1 #!/bin/sh -x
2
3 # echo 'error' | gearman -f grep_logs
4
5 if [ -z "$1" ] ; then
6         hostname=`hostname`
7         exec /srv/gearmand/bin/gearman -h 10.60.0.244 -w -f grep_$hostname $0 $hostname
8 fi
9
10 read pattern
11 grep $pattern /var/log/*.log