Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Changes to improve compatibility with OpenBSD. (see http://forum.yacy-websuche.de/viewtopic.php?f=8&t=5503)
Marc Nause53e4ae65d0bc
diff --git a/bin/addrss.sh b/bin/addrss.shindex 70209ef53..f4a923d33 100755--- a/bin/addrss.sh+++ b/bin/addrss.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/Load_RSS_p.html?indexAllItemContent=&repeat=off&url=$1" > /dev/nulldiff --git a/bin/apicall.sh b/bin/apicall.shindex 09400cbdb..d549e4282 100755--- a/bin/apicall.sh+++ b/bin/apicall.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)admin=$(grep ^adminAccountUserName= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)diff --git a/bin/apicat.sh b/bin/apicat.shindex 130892ae0..309b0eb4f 100755--- a/bin/apicat.sh+++ b/bin/apicat.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)pw=$(grep ^adminAccountBase64MD5= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)diff --git a/bin/checkalive.sh b/bin/checkalive.shindex 4ecda7b12..5650b16a0 100755--- a/bin/checkalive.sh+++ b/bin/checkalive.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"# for a production environment with high-availability requirement,diff --git a/bin/checkindex.sh b/bin/checkindex.shindex e8270bd4e..c93625080 100755--- a/bin/checkindex.sh+++ b/bin/checkindex.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`/.."for i in DATA/INDEX/* ; doif [ -d "$i" ]; thendiff --git a/bin/clearall.sh b/bin/clearall.shindex f54923d33..17cb50e99 100755--- a/bin/clearall.sh+++ b/bin/clearall.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/IndexControlURLs_p.html?deletecomplete=&deleteIndex=on&deleteSolr=on&deleteCrawlQueues=on&deleteRobots=on&deleteSearchFl=on&deleteCache=on" > /dev/null\ No newline at end of filediff --git a/bin/clearapi.sh b/bin/clearapi.shindex fe3554e12..b6af756c8 100755--- a/bin/clearapi.sh+++ b/bin/clearapi.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/Tables_p.html?table=api&deletetable=all" > /dev/null\ No newline at end of filediff --git a/bin/clearcache.sh b/bin/clearcache.shindex 84e63ff63..906595bec 100755--- a/bin/clearcache.sh+++ b/bin/clearcache.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/IndexControlURLs_p.html?deleteIndex=off&deleteSolr=off&deleteCache=on&deleteCrawlQueues=off&deleteRobots=on&deleteSearchFl=on&deletecomplete=" > /dev/nulldiff --git a/bin/clearindex.sh b/bin/clearindex.shindex 2f4545aea..c32abf94a 100755--- a/bin/clearindex.sh+++ b/bin/clearindex.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/IndexControlURLs_p.html?deletecomplete=&deleteIndex=on&deleteSolr=on&deleteCrawlQueues=on&deleteRobots=on&deleteSearchFl=on&deleteCache=off" > /dev/nulldiff --git a/bin/deleteurl.sh b/bin/deleteurl.shindex 933e0d9fe..fd9949637 100755--- a/bin/deleteurl.sh+++ b/bin/deleteurl.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/IndexControlURLs_p.html?urlhashdeleteall=&urlstring=$1" > /dev/nulldiff --git a/bin/deploy.sh b/bin/deploy.shindex 4d3d6b10f..164d96371 100755--- a/bin/deploy.sh+++ b/bin/deploy.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"cd .../stopYACY.shdiff --git a/bin/down.sh b/bin/down.shindex 787351bfe..a435840c0 100755--- a/bin/down.sh+++ b/bin/down.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)if which curl &>/dev/null; thendiff --git a/bin/dumpcheck.sh b/bin/dumpcheck.shindex abb15fa04..a7a89d56b 100755--- a/bin/dumpcheck.sh+++ b/bin/dumpcheck.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"java -ea -cp ../classes:../lib/yacycore.jar net.yacy.kelondro.logging.ThreadDump -f $1diff --git a/bin/importmediawiki.sh b/bin/importmediawiki.shindex e30ace27b..b520dc321 100755--- a/bin/importmediawiki.sh+++ b/bin/importmediawiki.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh /IndexImportMediawiki_p.html?file=$1 > /dev/nulldiff --git a/bin/importurllist.sh b/bin/importurllist.shindex 29d46ba60..1aad6c6c7 100755--- a/bin/importurllist.sh+++ b/bin/importurllist.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/Crawler_p.html?bookmarkFolder=/crawlStart&crawlingDomMaxPages=10000&intention=&range=domain&indexMedia=on&recrawl=nodoubles&storeHTCache=on&sitemapURL=&repeat_time=7&crawlingQ=on&crawlingIfOlderUnit=day&cachePolicy=ifexist&indexText=on&crawlingMode=file&crawlingURL=http://&bookmarkTitle=&mustnotmatch=&crawlingstart=import&mustmatch=.*&crawlingIfOlderNumber=7&repeat_unit=seldays&crawlingDepth=0&crawlingFile=$1" > /dev/nulldiff --git a/bin/indexdump.sh b/bin/indexdump.shindex dc18d0d58..5756e2cb5 100755--- a/bin/indexdump.sh+++ b/bin/indexdump.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/IndexControlURLs_p.xml?indexdump=" | awk '/<dumpfile>/{ gsub("<dumpfile>","" );gsub("<\/dumpfile>","" ); print $0 }' | awk '{print $1}';\ No newline at end of filediff --git a/bin/indexrestore.sh b/bin/indexrestore.shindex 9ecdb8a92..232f11ba1 100755--- a/bin/indexrestore.sh+++ b/bin/indexrestore.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/IndexControlURLs_p.xml?indexrestore=&dumpfile=$1" > /dev/nulldiff --git a/bin/myip.sh b/bin/myip.shindex 68d8ac569..ea4ca86d1 100755--- a/bin/myip.sh+++ b/bin/myip.sh@@ -1,3 +1,3 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/yacy/seedlist.xml?my=" | awk '/<IP>/{ gsub("<IP>","" );gsub("<\/IP>","" ); print $0 }' | awk '{print $1}';diff --git a/bin/passwd.sh b/bin/passwd.shindex 172f06006..7152dd515 100755--- a/bin/passwd.sh+++ b/bin/passwd.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/ConfigAccounts_p.html?setAdmin=&adminuser=admin&adminpw1=$1&adminpw2=$1&access=" > /dev/nullecho "Password for User Name 'admin' set to '$1'"\ No newline at end of filediff --git a/bin/search.sh b/bin/search.shindex f8e6e12fd..9a8bc645e 100755--- a/bin/search.sh+++ b/bin/search.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)./search1.sh -y localhost:$port "$1"\ No newline at end of filediff --git a/bin/search1.sh b/bin/search1.shindex b679e8e65..2a9c197ae 100755--- a/bin/search1.sh+++ b/bin/search1.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"if which curl &>/dev/null; thenwhile getopts "ys" opt; dodiff --git a/bin/searchall.sh b/bin/searchall.shindex 31c56282e..86e9aa521 100755--- a/bin/searchall.sh+++ b/bin/searchall.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)./searchall1.sh -s localhost:$port $1\ No newline at end of filediff --git a/bin/up.sh b/bin/up.shindex 895a0ea35..c0bbf41de 100755--- a/bin/up.sh+++ b/bin/up.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env shcd "`dirname $0`"./apicall.sh "/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';diff --git a/startYACY.sh b/startYACY.shindex ec0bfca43..f9af34de7 100755--- a/startYACY.sh+++ b/startYACY.sh@@ -45,8 +45,20 @@ USAGE#startup YaCycd "`dirname $0`"-options="`getopt -n YaCy -o h,d,l,p,t,g -l help,debug,logging,print-out,tail-log,gui -- $@`"+if [ $OS = "OpenBSD" ]+then+ if [ $(echo $@ | grep -o "\-\-" | wc -l) -ne 0 ]+ then+ echo "WARNING: Unfortunately this script does not support long options in $OS."+ fi++ options="`getopt -n YaCy -o h,d,l,p,t,g -- $@`"+else+ options="`getopt -n YaCy -o h,d,l,p,t,g -l help,debug,logging,print-out,tail-log,gui -- $@`"+fi+if [ $? -ne 0 ];then+exit 1;fi@@ -87,7 +99,7 @@ for option in $options;do-t|--tail-log)TAILLOG=1;;- -gui)+ -g|--gui)GUI=1isparameter=1;;