blockcheck: tolerate absense of config and config.default

This commit is contained in:
bol-van 2024-07-30 17:37:28 +03:00
parent 22a772e96b
commit 68061b61ae

View File

@ -5,7 +5,7 @@ EXEDIR="$(cd "$EXEDIR"; pwd)"
ZAPRET_CONFIG="$EXEDIR/config"
ZAPRET_BASE="$EXEDIR"
[ -f "$ZAPRET_CONFIG" ] || 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"