From 6ac84b85fb1ac52650f7110a7832e89710f4f3d5 Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 30 Jul 2024 17:41:50 +0300 Subject: [PATCH] blockcheck: tolerate absense of config and config.default --- blockcheck.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blockcheck.sh b/blockcheck.sh index 927e6a6..f798244 100755 --- a/blockcheck.sh +++ b/blockcheck.sh @@ -5,7 +5,9 @@ EXEDIR="$(cd "$EXEDIR"; pwd)" ZAPRET_CONFIG="$EXEDIR/config" ZAPRET_BASE="$EXEDIR" -[ -f "$ZAPRET_CONFIG" ] || [ -f "${ZAPRET_CONFIG}.default" ] && cp "${ZAPRET_CONFIG}.default" "$ZAPRET_CONFIG" +[ -f "$ZAPRET_CONFIG" ] || { + [ -f "${ZAPRET_CONFIG}.default" ] && cp "${ZAPRET_CONFIG}.default" "$ZAPRET_CONFIG" +} [ -f "$ZAPRET_CONFIG" ] && . "$ZAPRET_CONFIG" . "$ZAPRET_BASE/common/base.sh" . "$ZAPRET_BASE/common/dialog.sh"