diff options
| author | luccioman <luccioman@users.noreply.github.com> | 2016-12-31 09:51:07 +0100 |
|---|---|---|
| committer | luccioman <luccioman@users.noreply.github.com> | 2016-12-31 09:51:07 +0100 |
| commit | 1eafa7bfaf6b535123894e9267c3b7e670981686 (patch) | |
| tree | 1b0b7f7beea8bb4162f7c5312b27620840186472 /startYACY.sh | |
| parent | 1df558a6c6c86b96dd87987f7f8b87ad12b901c4 (diff) | |
Fixed docker stop behavior.
- Adjusted start script in debug mode to make sure the main java process
can receive signals such as SIGTERM
- Modified docker images main command to properly propagate SIGTERM
signal to the main java process
Diffstat (limited to 'startYACY.sh')
| -rwxr-xr-x | startYACY.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/startYACY.sh b/startYACY.sh index f935ae2e3..eea089f01 100755 --- a/startYACY.sh +++ b/startYACY.sh @@ -224,10 +224,16 @@ else echo "** STOP YaCy: execute stopYACY.sh and wait some seconds **" echo "** GET HELP for YaCy: see http://wiki.yacy.net and http://forum.yacy.de **" echo "*******************************************************************************" - echo " >> YaCy started as daemon process. Administration at http://localhost:$PORT << " - eval $cmdline - if [ "$TAILLOG" -eq "1" -a ! "$DEBUG" -eq "1" ];then - sleep 1 - tail -f DATA/LOG/yacy00.log + if [ $DEBUG -eq 1 ] #debug + then + # with exec the java process become the main process and will receive signals such as SIGTERM + exec $cmdline + else + echo " >> YaCy started as daemon process. Administration at http://localhost:$PORT << " + eval $cmdline + if [ "$TAILLOG" -eq "1" -a ! "$DEBUG" -eq "1" ];then + sleep 1 + tail -f DATA/LOG/yacy00.log + fi fi fi |
