From 106bfd0e5f7cc9cabf32a5c2110db44e9200bdd3 Mon Sep 17 00:00:00 2001 From: luccioman Date: Tue, 27 Nov 2018 11:36:40 +0100 Subject: Also check yacy.conf file existence in shell scripts where relevant --- bin/checkConfFile.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bin/checkConfFile.sh (limited to 'bin/checkConfFile.sh') diff --git a/bin/checkConfFile.sh b/bin/checkConfFile.sh new file mode 100644 index 000000000..9aa86e7de --- /dev/null +++ b/bin/checkConfFile.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh +# Check that a yacy configuration file exists under the DATA folder set by the variable YACY_DATA_PATH +# Exits with an error message and status 2 when the file is not found or is not a regular file + +if [ ! -f "$YACY_DATA_PATH/SETTINGS/yacy.conf" ]; then + echo "No YaCy configuration file found at $YACY_DATA_PATH/SETTINGS/yacy.conf" + exit 2 +fi \ No newline at end of file -- cgit v1.2.3