JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 02.10.2019, 20:26
pedz pedz is offline
Modem User
 
Join Date: Dec 2017
Posts: 4
Default Need ubuntu 18.04 systemd "script"

I live on a Mac but I have JDownloader running on an ODroid which is running Ubuntu 18.04. Right now I have a script (cleverly called Run) that I can kick off via the shell and it starts a headless JDownloader. The small angst is with each reboot, I need to log in and start it up.

Has anyone produced a systemd file to do this? I don't know jack about systemd and I'm not sure I want to learn.

Thank you
Reply With Quote
  #2  
Old 02.10.2019, 21:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

for example
/etc/systemd/system/jdownloader2.service
Quote:
[Unit]
Description=JDownloader2 Headless
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /path/JDownloader.jar
PIDFile=/path/JDownloader.pid
RemainAfterExit=yes
User=jdUser
Group=jdGroup

[Install]
WantedBy=multi-user.target
replace jdUser/jdGroup matching to /path
replace /path with JDownloader path
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 02.10.2019, 22:48
pedz pedz is offline
Modem User
 
Join Date: Dec 2017
Posts: 4
Default

Thanks!

When I did `systemctl start jdownloader2` it did not return to the prompt. So I stopped it and changed `Type` to `simple`
Reply With Quote
  #4  
Old 03.10.2019, 10:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

Thanks for the feedback. oneshot should also work when you place & at the end of ExecStart
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 09:40.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.