From 30a887466756a732c8d2b5022faed5e2c0a89add Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 27 Mar 2022 12:48:47 +0300 Subject: [PATCH] Ability to have shebangless run-s --- README | 17 +++++------------ probelist.sh | 2 +- run.sh | 3 ++- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/README b/README index 8454efe..87ad8dc 100644 --- a/README +++ b/README @@ -9,28 +9,21 @@ Create some directory hierarchy for convenience: Make probes from them: - $ cat > probes/example.com/ping4/run < probes/example.com/ping4/run < probes/example.com/http/max-attempts - $ cat > probes/example.com/ping4/run < probes/example.com/ping4/run - $ cat > probes/example.com/ping6/run < probes/example.com/ping6/run $ echo 5 > probes/example.com/ping4/period # every 5 seconds $ cat > probes/jails/foobar/run <state/stdout 2>state/stderr ; then + [ -x run ] && cmd=./run || cmd="sh -e run" + if $cmd >state/stdout 2>state/stderr ; then if [ "$attempts" -ge "$max_attempts" ] ; then "$SGMONDIR"/notify-ok.sh fi -- 2.44.0