From 5f1de4077c9f4e75b1b2d5296c919667fe9d7ba6 Mon Sep 17 00:00:00 2001 From: Kevin van Zonneveld Date: Wed, 23 Jul 2014 11:28:38 +0200 Subject: [PATCH] Better defaulting of ENV vars --- main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.sh b/main.sh index 073e62f..6ac4164 100755 --- a/main.sh +++ b/main.sh @@ -24,8 +24,8 @@ ### Configuration ##################################################################### -# Environment variables -[ -z "${LOG_LEVEL}" ] && LOG_LEVEL="6" # 7 = debug -> 0 = emergency +# Environment variables and their defaults +LOG_LEVEL="${LOG_LEVEL:-6}" # 7 = debug -> 0 = emergency # Commandline options. This defines the usage page, and is used to parse cli opts & defaults from. # the parsing is unforgiving so be precise in your syntax: