#1
|
|||
|
|||
![]()
Hi
There is already this kind of thread but it becomes very old with many answers in both English and German that makes it hard to follow The above procedure explains what I did to have Jdownloader working inside my Synology DS216/II with latest DSM F/W. This procedure is deeply made from explanations coming from existing threads Hi if it can help, here is what I made to have Jdownloader working and restarting in case of Syno restart: Install JAVA8 (from Paquet center) Create a Jdownloader directory inside /volume1/@appstore/ Go to that directory and follow instructions of :https://support.jdownloader.org/Know...bedded-devices Take care it needs to be in Root mode (so perform a sudo -i and enter password before) make: wget http://installer.jdownloader.org/JDownloader.jar then: java -jar JDownloader.jar -norestart repeat this command until JDownloader asks you to enter your MyJDownloader login/password on console you can now remote control your JDownloader instance via MyJDownloader with the credentials created before At this step it should already work with https://my.jdownloader.org/ and proper login/password created during the installation. Stop Jdownloader Go to /usr/local/etc and create a directory /rc.d Inside this directory create a file S99jdownloader.sh with the following content #!/bin/sh # # Startup script for jdownloader2 # # Stop myself if running PIDFILE=/volume1/@appstore/Jdownloader/JDownloader.pid # start() { sleep 5 nohup /volume1/@appstore/Java8/j2sdk-image/bin/java -Djava.awt.headless=true -jar /volume1/@appstore/Jdownloader/JDownloader.jar >/dev/null 2>/dev/null& } # stop() { [ -f ${PIDFILE} ] && kill `cat ${PIDFILE}` # remove pidfile rm -f $PIDFILE } # case "$1" in start) start ;; stop) stop ;; restart) stop sleep 10 start ;; *) echo "Usage: $0 (start|stop|restart)" exit 1 ;; esac # End Chmod this file to 0777 Reboot your NAS ..........et voila ! I have also this line in the task scheduler menu (non activated) /usr/local/etc/rc.d/S99jdownloader.sh start (in root mode) In case you want to restart manually without rebooting the NAS For all those settings you have to validate the SSH and my advice is to devalidate the SSH as soon as you do not need as SSH can be dangerous for security My doubt about this configuration is "will the .sh file keep when there will be a DSM update ?" Good luck Philippe Last edited by Jiaz; 06.04.2018 at 11:40. |
#2
|
||||
|
||||
![]()
Thanks for posting your solution and script.
I did little modification to your script! JDownloader creates its own PIDfile because PID can change over time. Also increased sleeps because start/stop might take some time. Also piped stdout and stderr to /dev/null ![]()
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
![]()
Jiaz
Well noted and modified and tested; I have the feeling the reboot time is longer but I do not care as reboot happened only in case of DSM updates; Synology is quite stable I hope it will help others regards Philippe |
#4
|
||||
|
||||
![]()
Thanks for feedback and testing.
__________________
JD-Dev & Server-Admin |
#5
|
||||
|
||||
![]()
We will soon link the new Synology install instructions HERE.
If you're not new to Synology and NOT familiar with linux/terminal, you should NOT do the terminal installation! -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
![]() |
Thread Tools | |
Display Modes | |
|
|