summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@lasker.childrenofmay.org>2023-04-24 12:41:59 -0400
committerroot <root@lasker.childrenofmay.org>2023-04-24 12:41:59 -0400
commit58db48b2824607a0b8eb2d94d838f847e03880ee (patch)
tree73a214387ee0d681432a5f0d8120cb6e2cac162d
parent0822c8328c1d41382c18c03bd8d0deb899269052 (diff)
add monitor subcommand
-rw-r--r--Makefile2
-rwxr-xr-xsocat.sh3
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 09918b8..156f8d7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
1 1
2all: 2all:
3 3
4status install: 4install status monitor:
5 ./socat.sh $@ 5 ./socat.sh $@
6 6
diff --git a/socat.sh b/socat.sh
index 1afb4a4..d289e98 100755
--- a/socat.sh
+++ b/socat.sh
@@ -71,6 +71,9 @@ main()
71 status) 71 status)
72 systemctl status "$UNIT" 72 systemctl status "$UNIT"
73 ;; 73 ;;
74 monitor)
75 journalctl -u "$UNIT" -f
76 ;;
74 *) 77 *)
75 echo "Usage: $0 install [destination [destination port [local port]]]" >&2 78 echo "Usage: $0 install [destination [destination port [local port]]]" >&2
76 echo " $0 status" >&2 79 echo " $0 status" >&2