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 &
|
||||
|
||||
PID=$!
|
||||
grep -q "INFO Listening on :80\[http\]" < "$PIPE"
|
||||
grep -q -m 1 "INFO Listening on :80\[http\]" < "$PIPE"
|
||||
kill "$PID"
|
||||
wait "$PID" || true
|
||||
rm -f "$PIPE"
|
||||
|
@@ -70,7 +70,7 @@ mkfifo "$CAT_PIPE" "$GREP_PIPE"
|
||||
|
||||
tee "$CAT_PIPE" "$GREP_PIPE" < "$PIPE" > /dev/null &
|
||||
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_url="http://127.0.0.1:9091${rpc_path}rpc/"
|
||||
|
Reference in New Issue
Block a user