14 lines
434 B
INI
14 lines
434 B
INI
# $Id: port-watch.ini,v 1.1 2004/09/07 13:51:08 rockyb Exp $
|
|
|
|
# Here is an example to show how to use ps-watcher to do something
|
|
# not really possible from ps: check to see if a *port* is active.
|
|
# We make use of lsof to check port 3333 and the $PROLOG make
|
|
# sure it runs.
|
|
|
|
[$PROLOG]
|
|
occurs = first
|
|
trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 }
|
|
action = <<EOT
|
|
put-your-favorite-command-here arg1 arg2 ...
|
|
EOT
|