diff options
author | Holodoc | 2016-01-24 19:03:49 +0100 |
---|---|---|
committer | Holodoc | 2016-01-24 19:03:49 +0100 |
commit | 5b2e6ebe3613a8fc3a60e6b2d942a89c27066717 (patch) | |
tree | a381ce5c73430044c7d0670dd40a8b7803c91cd6 /JDownloaderHeadless | |
parent | 589acb6cf1de9fa966f9391d434a4c74f3077490 (diff) | |
download | aur-5b2e6ebe3613a8fc3a60e6b2d942a89c27066717.tar.gz |
Redirecting Log to file
Diffstat (limited to 'JDownloaderHeadless')
-rw-r--r-- | JDownloaderHeadless | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/JDownloaderHeadless b/JDownloaderHeadless index 9f0fa031186c..8186cc61af6c 100644 --- a/JDownloaderHeadless +++ b/JDownloaderHeadless @@ -20,4 +20,11 @@ if [ ! -f "JDownloader.jar" ]; then wget -O JDownloader.jar http://installer.jdownloader.org/JDownloader.jar fi -exec java -Djava.awt.headless=true -jar JDownloader.jar -norestart "$@" +LOGFILE="JDownloader.service.log" + +if [ -f "$LOGFILE" ]; then + # Save the old Logfile (this automatically removes the n-2 one, if there is one) + mv "${LOGFILE}" "${LOGFILE}.old" +fi +echo "All output is redirected to \"$(readlink -f "${LOGFILE}")\"" +exec java -Djava.awt.headless=true -jar JDownloader.jar -norestart "$@" >"${LOGFILE}" 2>&1 |