From 387efbc95f0d3a621ed6d3aa3eda11f649777fb6 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Tue, 28 Jul 2020 12:22:46 +0200 Subject: [PATCH] adjust help text --- tar1090.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tar1090.sh b/tar1090.sh index 273bc8d..65db727 100755 --- a/tar1090.sh +++ b/tar1090.sh @@ -10,17 +10,23 @@ RUN_DIR=$1 SRC_DIR=$2 if ! [[ -d $RUN_DIR ]]; then - echo "runtime directory ( $RUN_DIR ) is not a directory, fatal error!" + echo "runtime directory (first argument: $RUN_DIR) is not a directory, fatal error!" + exit 1 +fi +if ! [[ -z $SRC_DIR ]]; then + echo "source directory (2nd argument) not specified, fatal error!" exit 1 fi if [[ -z $HISTORY_SIZE || -z $INTERVAL || -z $CHUNK_SIZE ]] then - echo "Syntax: bash tar1090.sh " + echo "Syntax: bash tar1090.sh " echo "Missing some settings from environment variables, using defaults:" echo "history interval: 8 seconds" echo "history size: 450 entries" echo "chunk size: 60 entries" + echo "really either use the file named default as a systemd environment file or export those variables yourself" + echo "in other words: figure it out ;)" INTERVAL=8 HISTORY_SIZE=450 CHUNK_SIZE=60