Minor grep improvements
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -7,7 +7,7 @@ mkfifo "$PIPE"
|
|||||||
ntfy serve > "$PIPE" 2>&1 &
|
ntfy serve > "$PIPE" 2>&1 &
|
||||||
|
|
||||||
PID=$!
|
PID=$!
|
||||||
grep -q "INFO Listening on :80\[http\]" < "$PIPE"
|
grep -q -m 1 "INFO Listening on :80\[http\]" < "$PIPE"
|
||||||
kill "$PID"
|
kill "$PID"
|
||||||
wait "$PID" || true
|
wait "$PID" || true
|
||||||
rm -f "$PIPE"
|
rm -f "$PIPE"
|
||||||
|
@@ -70,7 +70,7 @@ mkfifo "$CAT_PIPE" "$GREP_PIPE"
|
|||||||
|
|
||||||
tee "$CAT_PIPE" "$GREP_PIPE" < "$PIPE" > /dev/null &
|
tee "$CAT_PIPE" "$GREP_PIPE" < "$PIPE" > /dev/null &
|
||||||
cat "$CAT_PIPE" &
|
cat "$CAT_PIPE" &
|
||||||
grep -qm1 "Serving RPC and Web requests on 0.0.0.0:9091" < "$GREP_PIPE"
|
grep -q -m 1 "Serving RPC and Web requests on 0.0.0.0:9091" < "$GREP_PIPE"
|
||||||
|
|
||||||
rpc_path="$(jq -r '.["rpc-url"]' /etc/transmission/settings.json)"
|
rpc_path="$(jq -r '.["rpc-url"]' /etc/transmission/settings.json)"
|
||||||
rpc_url="http://127.0.0.1:9091${rpc_path}rpc/"
|
rpc_url="http://127.0.0.1:9091${rpc_path}rpc/"
|
||||||
|
Reference in New Issue
Block a user