Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
different algorithm to test checkalive as it depends less on the existence of wget (or curl) on the OS.
Michael Peter Christen68417a05c58a
diff --git a/bin/checkalive.sh b/bin/checkalive.shindex 672fc3c28..07083bfe7 100755--- a/bin/checkalive.sh+++ b/bin/checkalive.sh@@ -1,19 +1,15 @@#!/bin/bash+cd "`dirname $0`"# for a production environment with high-availability requirement,# (and if you are using the debian version of yacy)# add the following line in /etc/crontab# 0 * * * * root cd /usr/share/yacy/bin && ./checkalive.sh-port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)-RESULT=`wget -t 1 --spider http://localhost:$port/Status.html 2>&1`FLAG=0--for x in $RESULT; do- if [ "$x" = '200' ]; then- FLAG=1- fi-done+if [ `./apicall.sh /Status.html | grep "</html>"` ]; then+ FLAG=1+fiif [ $FLAG -eq '0' ]; thencd ..@@ -22,5 +18,4 @@ if [ $FLAG -eq '0' ]; thenrm DATA/yacy.running./startYACY.shfi--exit+exit\ No newline at end of file