From 5c7102715bfa4b8ecf4c324254b3125026ed1d79 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Tue, 31 Aug 2021 10:44:58 +0200 Subject: [slxlog] Do not print any commands if echo command is submitted --- core/modules/slxlog/data/opt/openslx/bin/slxlog | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/modules/slxlog/data/opt/openslx/bin/slxlog b/core/modules/slxlog/data/opt/openslx/bin/slxlog index f58934bc..fae6f5c8 100755 --- a/core/modules/slxlog/data/opt/openslx/bin/slxlog +++ b/core/modules/slxlog/data/opt/openslx/bin/slxlog @@ -10,19 +10,22 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin" +[ $# -eq 0 ] && exit 0 + . /opt/openslx/config [ -z "$SLX_REMOTE_LOG" ] && exit 3 USER=$(whoami) LOGCHECK="/tmp/remote_log_check-$USER" NOW=$(date +%s) +ECHO= DELFILE= SYNC= while [ $# -gt 0 ]; do case "$1" in -e|--echo) - echo "$@" + ECHO=yes ;; -d|--delete) DELFILE=yes @@ -37,7 +40,9 @@ while [ $# -gt 0 ]; do shift done -[ $# -eq 0 ] && exit 0 +if [ "${ECHO}" == "yes" ]; then + echo "$@" +fi TYPE="$1" -- cgit v1.2.3-55-g7522