From 58db48b2824607a0b8eb2d94d838f847e03880ee Mon Sep 17 00:00:00 2001 From: root Date: Mon, 24 Apr 2023 12:41:59 -0400 Subject: add monitor subcommand --- Makefile | 2 +- socat.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 09918b8..156f8d7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ all: -status install: +install status monitor: ./socat.sh $@ diff --git a/socat.sh b/socat.sh index 1afb4a4..d289e98 100755 --- a/socat.sh +++ b/socat.sh @@ -71,6 +71,9 @@ main() status) systemctl status "$UNIT" ;; + monitor) + journalctl -u "$UNIT" -f + ;; *) echo "Usage: $0 install [destination [destination port [local port]]]" >&2 echo " $0 status" >&2 -- cgit v1.2.3