blockcheck: tolerate absense of config and config.default

This commit is contained in:
bol-van 2024-07-30 17:41:50 +03:00
parent 68061b61ae
commit 6ac84b85fb

View File

@ -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"