summaryrefslogtreecommitdiff
path: root/stopYACY.sh
diff options
context:
space:
mode:
authorluccioman <luccioman@users.noreply.github.com>2017-03-21 17:15:01 +0100
committerluccioman <luccioman@users.noreply.github.com>2017-03-21 17:15:01 +0100
commit29e511062769b24a93493bdcd549edfeaa14be35 (patch)
tree91ea30893db5d26eb98e1be6997a909106df908e /stopYACY.sh
parentbdadbda5fa5bdc9fbae1a08753c3a11b75a36fd4 (diff)
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
Diffstat (limited to 'stopYACY.sh')
-rwxr-xr-xstopYACY.sh7
1 files changed, 4 insertions, 3 deletions
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