diff options
| author | Michael Christen <mc@yacy.net> | 2011-12-28 02:46:29 +0100 |
|---|---|---|
| committer | Michael Christen <mc@yacy.net> | 2011-12-28 02:46:29 +0100 |
| commit | 3e5ac15c710d8e6f5188cf000c5dad5c0c62fd75 (patch) | |
| tree | 8c12e69c19bccfcb0db99f9db21ac494c73445c4 /stopYACY.sh | |
| parent | 1cf0f35621e6ea03af08f2b292c41fbcd3fd0a66 (diff) | |
add a check script that waits for stopYACY.sh to terminate. That makes
it easier to write control scripts around it. If you want that the
script terminates directly as before, call it concurrently or wrap it
with 'timeout' like:
timeout 10s ./stopYACY.sh
to stop after 10 seconds
Diffstat (limited to 'stopYACY.sh')
| -rwxr-xr-x | stopYACY.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stopYACY.sh b/stopYACY.sh index 3b45c134a..2385ad0d0 100755 --- a/stopYACY.sh +++ b/stopYACY.sh @@ -32,3 +32,10 @@ else echo "Neither wget nor java could be found or are not executable." echo "Visit http://localhost:$port/Steering.html?shutdown=true to stop YaCy or (in emergency case) use ./killYACY.sh" fi + +# wait until the yacy.running file disappears which means that YaCy has terminated +# If you don't want to wait, just run this concurrently +while [ -f "DATA/yacy.running" ] +do +sleep 1 +done |
