JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 17.12.2017, 12:17
animus animus is offline
DSL User
 
Join Date: Jan 2010
Posts: 36
Default help needed.debian bash script and launch at boot

hi

i dont know where to post this but here it is

i just made a 24/7 open set up with asus tinkerboard and an external harddrive
as my download machine (may be a nas/fileserver for the the future if i can figure out a way to use smb and resillio).

i got the jd2 working somehow but i have to connect to tinkerboard via vnc and select the folder jd2 is in ,open a terminal with the folder then enter the headless mode command "java -Djava.awt.headless=true -jar JDownloader.jar" everytime it rebooted after a black out or etc.i couldnt make the sh file work for debian (possibly because the board is using arm arch)

my question is
is there a way to automate this.basicly write a script for the headless process that wont open a terminal window or hide it somehow (for accidental closing)
at boot.jd will close if you close the terminal window

i am at complete lost since because i started using linux 3-4 days ago.looking around everywhere i managed to do somethings but i need some help
Reply With Quote
  #2  
Old 19.12.2017, 10:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 62,397
Default

Just add
/path/java -Djava.awt.headless=true -jar /path/JDownloader.jar >/dev/null 2>/dev/null &
to your /etc/rc.local
or some other *autostart* locations of your system

In case you have installed JD as different user, use

su -c "/path/java -Djava.awt.headless=true -jar /path/JDownloader.jar >/dev/null 2>/dev/null &" user
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 19.12.2017, 10:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 62,397
Default

You don't have to connect via vnc. Just connect via ssh and start it from there

simple start script
Code:
#!/bin/bash
cd /pathToJDownloaderFolder
/pathToJavaFolder/java -Djava.awt.headless=true -jar /pathToJDownloaderFolder/JDownloader.jar >/dev/null 2>/dev/null &
chmod +x scriptname

and place it to *autostart* location of your os.

In case you need further help, best contact us via support@jdownloader.org
__________________
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 00:42.
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.