JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > English Support > General Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old 02.10.2019, 19:26
pedz
Guest
 
Posts: n/a
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, 20:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
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, 21:48
pedz
Guest
 
Posts: n/a
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, 09:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
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


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 08:22.
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 - 2024, Jelsoft Enterprises Ltd.