From 29e511062769b24a93493bdcd549edfeaa14be35 Mon Sep 17 00:00:00 2001 From: luccioman Date: Tue, 21 Mar 2017 17:15:01 +0100 Subject: Updated shell scripts to be compatible with HTTP Digest authentication Because curl and wget do not let use a hashed password as parameter, YaCy shell scripts which require authentication are now interactive by default when HTTP Digest is the only available authentication method. Batch mode can still be available trough the use of an environment variable : YACY_ADMIN_PASSWORD. Other improvements : - added backward compatibility for Basic Authentication - fixed curl/wget presence detection - do not return with exit code 0 when an API call failed, and print an error message when the case occurs - documented available authentication options for API calls --- stopYACY.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'stopYACY.sh') diff --git a/stopYACY.sh b/stopYACY.sh index 1a679e68d..1109eaad0 100755 --- a/stopYACY.sh +++ b/stopYACY.sh @@ -1,10 +1,11 @@ #!/usr/bin/env sh cd `dirname $0` -bin/apicall.sh "Steering.html?shutdown=true" > /dev/null +(bin/apicall.sh "Steering.html?shutdown=true" > /dev/null && \ -echo "Please wait until the YaCy daemon process terminates [wget]" -echo "You can monitor this with 'tail -f DATA/LOG/yacy00.log' and 'fuser log/yacy00.log'" +echo "Please wait until the YaCy daemon process terminates [wget]" && \ +echo "You can monitor this with 'tail -f DATA/LOG/yacy00.log' and 'fuser log/yacy00.log'") || \ +exit $? # wait until the yacy.running file disappears which means that YaCy has terminated # If you don't want to wait, just run this concurrently -- cgit v1.2.3