mirror of
https://git.netzspielplatz.de/docker-multiarch/jdownloader2-headless.git
synced 2025-11-08 17:09:30 +00:00
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
This commit is contained in:
parent
5e0f5ecc3b
commit
ee524983cd
1 changed files with 17 additions and 0 deletions
17
startJD2.sh
Executable file
17
startJD2.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue