pass arbitrary command, e.g. workers
authorDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Wed, 11 Apr 2012 19:28:03 +0000 (21:28 +0200)
committerDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Wed, 11 Apr 2012 19:28:03 +0000 (21:28 +0200)
gearman-status.sh

index ff2cd68..85c8f7b 100755 (executable)
@@ -1,3 +1,5 @@
 #!/bin/sh -xe
 
-echo STATUS | nc -w 1 127.0.0.1 4730 | column -t
+command=$1
+test -z "$command" && command="STATUS"
+echo $command | nc -w 1 127.0.0.1 4730 | column -t