mirror of
https://git.netzspielplatz.de/docker-multiarch/jdownloader2-headless.git
synced 2025-11-08 20:39:31 +00:00
21 lines
333 B
Bash
Executable file
21 lines
333 B
Bash
Executable file
#!/bin/bash
|
|
|
|
function stopJD2 {
|
|
PID=$(cat JDownloader.pid)
|
|
kill $PID
|
|
wait $PID
|
|
exit
|
|
}
|
|
|
|
trap stopJD2 EXIT
|
|
|
|
# Add a user to run the jdownloader
|
|
addgroup --gid $GID jdusers
|
|
useradd -M --uid $UID --gid $GID jduser
|
|
|
|
su jduser -c 'java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar &'
|
|
|
|
while true; do
|
|
sleep inf
|
|
done
|
|
|