Skip to content
Permalink
Browse files

Also check yacy.conf file existence in shell scripts where relevant

  • Loading branch information...
luccioman committed Nov 27, 2018
1 parent 17ad1f7 commit 106bfd0e5f7cc9cabf32a5c2110db44e9200bdd3
Showing with 15 additions and 0 deletions.
  1. +1 −0 bin/apicall.sh
  2. +1 −0 bin/apicat.sh
  3. +8 −0 bin/checkConfFile.sh
  4. +1 −0 bin/down.sh
  5. +1 −0 bin/graphicstest.sh
  6. +1 −0 bin/protectedPostApiCall.sh
  7. +1 −0 bin/search.sh
  8. +1 −0 bin/searchall.sh
@@ -15,6 +15,7 @@

cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
admin=$(grep ^adminAccountUserName= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
@@ -17,6 +17,7 @@

cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
admin=$(grep ^adminAccountUserName= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
@@ -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
@@ -1,6 +1,7 @@
#!/usr/bin/env sh
cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)

@@ -1,6 +1,7 @@
#!/usr/bin/env sh
cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
while [ 1 = 1 ]
@@ -16,6 +16,7 @@

cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
admin=$(grep ^adminAccountUserName= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
@@ -1,6 +1,7 @@
#!/usr/bin/env sh
cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
./search1.sh -y localhost:$port "$1"
@@ -1,6 +1,7 @@
#!/usr/bin/env sh
cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
./searchall1.sh -s localhost:$port $1

0 comments on commit 106bfd0

Please sign in to comment.
You can’t perform that action at this time.