From f9bbb5ec05a1e360bde9da0c3fdd99079636ec29 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 27 Apr 2023 08:45:50 -0400 Subject: whitespace --- socat.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/socat.sh b/socat.sh index c3e0e60..e3f1220 100755 --- a/socat.sh +++ b/socat.sh @@ -14,14 +14,14 @@ service_launch_command() local dest port local_port dest=${1:-$default_dest} case "$dest" in - '') return 1 ;; - *:*) - port=${dest#*:} - dest=${dest%%:*} - ;; - *) - port=${2:-$default_port} - ;; + '') return 1 ;; + *:*) + port=${dest#*:} + dest=${dest%%:*} + ;; + *) + port=${2:-$default_port} + ;; esac local_port=${3:-$port} @@ -51,7 +51,7 @@ main() case "$1" in install) shift - COMMAND=$(service_launch_command "$@") + COMMAND=$(service_launch_command "$@") if systemctl is-active "$UNIT" >/dev/null then systemctl stop "$UNIT" @@ -66,16 +66,16 @@ main() "$0" watchdog "$COMMAND" verify_service_availability ;; watchdog) - shift + shift watchdog $$ "$2" & exec $1 ;; - status) - systemctl status "$UNIT" - ;; - monitor) - journalctl -u "$UNIT" -f - ;; + 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