jdownloader2-headless/startJD2.sh
PlusMinus ee524983cd When an update in JD2 was triggered and it restarted, the docker stopped. The added script should:
a) prevent it
b) kill JD gradually, when docker stop is being executed on this container
2015-08-28 15:39:01 +02:00

17 lines
194 B
Bash
Executable file

#!/bin/bash
function stopJD2 {
PID=$(cat JDownloader.pid)
kill $PID
wait $PID
exit
}
trap stopJD2 EXIT
java -Djava.awt.headless=true -jar JDownloader.jar
while true; do
sleep inf
done