#1
|
|||
|
|||
![]()
How to add JD2 to Ubuntu Server autostart - without gui. Only Ubuntu console.
|
#2
|
||||
|
||||
![]()
Write a script that starts JDownloader in headless mode
java -Djava.awt.headless=true -jar JDownloader.jar >/dev/null 2>/dev/null you should run that script as different user eg su -c "/.../script.sh &" user You can either place it in /etc/rc.local or write a systemd file for it
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
![]()
I do not know what I'm doing wrong, but something does not work for me.
|
#4
|
||||
|
||||
![]()
write little script, eg start.sh
Code:
#!/bin/bash cd /pathtoJDownloader java -Djava.awt.headless=true -jar JDownloader.jar >/dev/null 2>/dev/null & now edit /etc/rc.local add line to start.sh, next start your system will execute the script in case you want to use a different user su -c "...start.sh" user
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
![]()
I followed the above guidelines and it looks like JD has started.
Code:
pietrek@testujemy:~$ ps aux | grep JDownloader.jar pietrek 914 21.0 4.1 3304924 85664 ? Sl 22:53 0:09 /usr/lib/jvm/jdk1.8.0_131/jre/bin/java -Djava.awt.headless=true -jar /home/pietrek/jd2/tmp/update/self/JDU/JDownloader.jar -selftest tmp/selftest_1500670420164 /home/pietrek/jd2 pietrek 953 0.0 0.0 15460 924 pts/0 S+ 22:54 0:00 grep --color=auto JDownloader.jar What could be wrong? How to modify it? |
#6
|
||||
|
||||
![]()
the output shows that JDownloader was updating
did you setup MyJDownloader logins for this installation yet?
__________________
JD-Dev & Server-Admin |
#7
|
|||
|
|||
![]()
Login data was given. When I run the command:
Code:
java -jar JDownloader.jar the web interface works and I can log in. Where can I verify this password and login? |
#8
|
||||
|
||||
![]()
can you show the complete script?
__________________
JD-Dev & Server-Admin |
#9
|
|||
|
|||
![]() Code:
pietrek@testujemy:~/jd2$ cat start.sh #!/bin/bash cd /home/pietrek/jd2 java -Djava.awt.headless=true -jar JDownloader.jar >/dev/nu l 2>/dev/null & Code:
pietrek@testujemy:/etc$ cat rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runl vel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. su -c "/home/pietrek/jd2/start.sh" pietrek exit 0 |
#10
|
||||
|
||||
![]()
make sure the folder has correct permissions
sudo chown -R user:group /home/pietrek/jd2
__________________
JD-Dev & Server-Admin |
#11
|
|||
|
|||
![]()
I have the following permissions:
Code:
drwxrwxr-x 17 pietrek pietrek 4096 lip 22 20:38 jd2 What to change? |
#12
|
||||
|
||||
![]()
and all files in it as well?
all ower are correct?
__________________
JD-Dev & Server-Admin |
#13
|
|||
|
|||
![]() Code:
pietrek@testujemy:~/jd2$ ls -l razem 11336 -rw-r--r-- 1 root root 320 lip 21 12:11 build.json drwxrwxr-x 7 pietrek pietrek 4096 cze 2 11:44 captchas drwxrwxr-x 6 pietrek pietrek 36864 lip 22 21:18 cfg -rw-r--r-- 1 root root 7887844 lip 21 12:11 Core.jar -rw-rw-r-- 1 pietrek pietrek 100384 lip 2 13:03 error.log drwxrwxr-x 2 pietrek pietrek 4096 cze 25 06:58 extensions drwxrwxr-x 2 pietrek pietrek 4096 lip 7 2016 java drwxrwxr-x 4 pietrek pietrek 4096 lip 7 2016 jd -rwxr-xr-x 1 pietrek pietrek 12198 sty 19 2016 JDownloader2 -rwxr-xr-x 1 pietrek pietrek 12270 sty 19 2016 JDownloader2Update -rw-r--r-- 1 pietrek pietrek 31 sty 19 2016 JDownloader2Update.vmoptions -rw-r--r-- 1 pietrek pietrek 31 sty 19 2016 JDownloader2.vmoptions -rw-r--r-- 1 root root 3299093 lip 21 12:11 JDownloader.jar -rwxr-xr-x 1 pietrek pietrek 205 lip 7 2016 JDownloader 2.desktop -rwxr-xr-x 1 pietrek pietrek 233 lip 7 2016 JDownloader 2 Update & Rescue.desktop drwxrwxr-x 6 pietrek pietrek 4096 lip 7 2016 jre drwxrwxr-x 5 pietrek pietrek 4096 lip 21 12:11 libs -rw-rw-r-- 1 pietrek pietrek 39624 lip 7 2016 license_german.txt drwxrwxr-x 5 pietrek pietrek 4096 maj 4 18:29 licenses -rw-rw-r-- 1 pietrek pietrek 32034 lip 7 2016 license.txt drwxrwxr-x 1137 pietrek pietrek 77824 lip 22 21:18 logs -rw-rw-r-- 1 pietrek pietrek 5334 lip 2 13:03 output.log -rwxrwxr-x 1 pietrek pietrek 109 lip 21 22:47 start.sh drwxrwxr-x 3 pietrek pietrek 4096 lip 7 2016 themes drwxrwxr-x 8 pietrek pietrek 4096 lip 22 21:18 tmp drwxrwxr-x 3 pietrek pietrek 4096 lip 7 2016 tools drwxrwxr-x 5 pietrek pietrek 4096 lip 7 2016 translations -rwx------ 1 pietrek pietrek 12972 sty 19 2016 Uninstall JDownloader drwxrwxr-x 3 pietrek pietrek 4096 lip 7 2016 update Convert from user pietrek to root or vice versa root on pietrek? Last edited by pietrek; 22.07.2017 at 21:56. |
#14
|
||||
|
||||
![]()
if you've already run chown -R then you must be running JDownloader as root as ownership has changed
build.json, JDownloader.jar, and Core.jar is owned by root:root
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] Last edited by raztoki; 24.07.2017 at 03:03. |
#15
|
||||
|
||||
![]()
Raztoki is right, please fix all owner (recursivly) with that command!
__________________
JD-Dev & Server-Admin |
#16
|
||||
|
||||
![]()
and then never run as root again ;p
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#17
|
|||
|
|||
![]()
Thank you. It works. :-)
|
#18
|
||||
|
||||
![]()
Thanks for the feedback!
__________________
JD-Dev & Server-Admin |
![]() |
Thread Tools | |
Display Modes | |
|
|