JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #221  
Old 10.03.2015, 18:53
BlueHazard
Guest
 
Posts: n/a
Default

Habe die E-Mail gesendet. Dann warte ich mal ab
Reply With Quote
  #222  
Old 10.03.2015, 19:45
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

Solved via Teamviewer
__________________
JD-Dev & Server-Admin
Reply With Quote
  #223  
Old 23.03.2015, 12:36
sluk
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by T_Send View Post

I use JD unix server headless instance, accessing via WEB INTERFACE @ my.jdownloader.org
To make it easy to manage I wrote "Start Stop Restart Status" SCRIPT


Here is HOW-TO for newbies:

1. Create file jdownloader with text editor of your choice at /etc/init.d/ i.e.:
Code:
sudo vim /etc/init.d/jdownloader

2. Paste this content and replace red-bold text with your variables:
Code:
#! /bin/sh
# /etc/init.d/jdownloader
### BEGIN INIT INFO
# Provides: jDownloader2
# Required-Start: networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: jDownloader2 Server Daemon
# Description: Starts/Stops/Restarts/Status the jDownloader2 Server Daemon
### END INIT INFO
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="jDownloader2 Server"
NAME="jdownloader"
## USER for new files ownership & make sure USER has read/write permission to DOWNLOAD-DIR
USER=<user_name_to_run_as> 
DIR="<path_to_JD_folder>"
SCRIPT="/etc/init.d/$NAME"
PIDFILE="/var/run/$NAME.pid"
JAVA="<complete_path_to_java_exec>"
PARM="-Djava.awt.headless=true -jar $DIR/JDownloader.jar"
STATUS="$JAVA $PARM"

. /lib/lsb/init-functions

start_daemon () {
        start-stop-daemon --start \
			--chuid $USER \
			--oknodo \
			--background \
			--make-pidfile --pidfile $PIDFILE \
			--exec $JAVA -- $PARM
		log_end_msg $?
}

case "$1" in
    start)
        log_daemon_msg "Starting daemon" "$DESC "
        start_daemon
        ;;
    stop)
        log_daemon_msg "Stopping daemon" "$DESC "
        start-stop-daemon --stop \
            --pidfile $PIDFILE
        log_end_msg $?


Hope it helps someone.
Regards,
T_Send

Restart and Stop not working properly due to JDownloader did not remove the PID file, below is the modified working version:
Code:
#!/bin/sh
# /etc/init.d/jdownloader
### BEGIN INIT INFO
# Provides: jDownloader2
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: jDownloader2 Server Daemon
# Description: Starts/Stops/Restarts/Status the jDownloader2 Server Daemon
### END INIT INFO
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="jDownloader2 Server"
NAME="jdownloader"
## USER for new files ownership & make sure USER has read/write permission to DOWNLOAD-DIR
USER=<user_name_to_run_as>
DIR="<path_to_JD_folder>"
SCRIPT="/etc/init.d/$NAME"
PIDFILE="/var/run/$NAME.pid"
JAVA="<complete_path_to_java_exec>"
PARM="-Djava.awt.headless=true -jar $DIR/JDownloader.jar > /dev/null 2>&1 &"
STATUS="$JAVA $PARM"

. /lib/lsb/init-functions

start_daemon () {
        start-stop-daemon --start \
                        --chuid $USER \
                        --oknodo \
                        --background \
                        --make-pidfile --pidfile $PIDFILE \
                        --exec $JAVA -- $PARM
                log_end_msg $?
}

case "$1" in
    start)
        log_daemon_msg "Starting daemon" "$DESC "
        start_daemon
        ;;
    stop)
        log_daemon_msg "Stopping daemon" "$DESC "
        start-stop-daemon --stop --quiet --pidfile $PIDFILE
        # Wait a little and remove stale PID file
        sleep 1
        if [ -f $PIDFILE ] && ! ps h `cat $PIDFILE` > /dev/null
                then
                        # Stale PID file, remove it (should be removed by
                        # jDownloader2 itself IMHO).
                        rm -f $PIDFILE
                fi

        log_end_msg $?
        ;;
    restart)
        log_daemon_msg "Restarting daemon" "$DESC "
        start-stop-daemon --stop --quiet --pidfile $PIDFILE
        # Wait a little and remove stale PID file
        sleep 1
        if [ -f $PIDFILE ] && ! ps h `cat $PIDFILE` > /dev/null
                then
                        # Stale PID file, remove it (should be removed by
                        # jDownloader2 itself IMHO).
                        rm -f $PIDFILE
                fi

        log_end_msg $?
        start_daemon
        ;;
    status)
        status_of_proc "$STATUS" "$DESC " && exit 0 || exit $?
        ;;
    *)
        log_action_msg "Usage: $SCRIPT {start|stop|restart|status}" || true
        exit 2
        ;;
esac

exit 0

Last edited by sluk; 23.03.2015 at 12:39.
Reply With Quote
  #224  
Old 23.03.2015, 12:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

JDownloader removed PID file when stopped normally (no kill -9). Do not use the PID from starter script.
JDownloader creates own PID file, because restarts can appear and script PID file will no longer be correct one.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #225  
Old 23.03.2015, 13:16
sluk
Guest
 
Posts: n/a
Default

Where is the folder location of the JDownloader created PID file?

Edit: Found it, under it's installation folder

Updated /etc/init.d/jdownloader script, assume JDownloader will handle it's own PID. Also keep a dummy script generated PID, the script will clean up the script generated PID upon service start/stop/restart.

Code:
#!/bin/sh
# /etc/init.d/jdownloader
### BEGIN INIT INFO
# Provides: jDownloader2
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: jDownloader2 Server Daemon
# Description: Starts/Stops/Restarts/Status the jDownloader2 Server Daemon
### END INIT INFO
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="jDownloader2 Server"
NAME="jdownloader"
## USER for new files ownership & make sure USER has read/write permission to DOWNLOAD-DIR
USER=<user_name_to_run_as>
DIR="<path_to_JD_folder>"
SCRIPT="/etc/init.d/$NAME"
## Dummy PID file for start-stop-daemon script, JDownloader will able to generate/remove $PIDFILE below
JDPID="/var/run/jdownloader.pid"
PIDFILE="$DIR/JDownloader.pid"
JAVA="<complete_path_to_java_exec>"
PARM="-Djava.awt.headless=true -jar $DIR/JDownloader.jar > /dev/null 2>&1 &"
STATUS="$JAVA $PARM"

. /lib/lsb/init-functions

start_daemon () {
        start-stop-daemon --start \
                        --chuid $USER \
                        --oknodo \
                        --background \
                        --make-pidfile --pidfile $JDPID \
                        --exec $JAVA -- $PARM
                log_end_msg $?
}

case "$1" in
    start)
        log_daemon_msg "Starting daemon" "$DESC "
        rm -f $JDPID
        start_daemon
        ;;
    stop)
        log_daemon_msg "Stopping daemon" "$DESC "
        start-stop-daemon --stop --quiet --pidfile $PIDFILE
        # Wait a little and remove stale PID file
        sleep 1
        if [ -f $PIDFILE ] && ! ps h `cat $PIDFILE` > /dev/null
                then
                        # Stale PID file, remove it (should be removed by
                        # jDownloader2 itself IMHO).
                        rm -f $PIDFILE
                fi
        rm -f $JDPID
        log_end_msg $?
        ;;
    restart)
        log_daemon_msg "Restarting daemon" "$DESC "
        start-stop-daemon --stop --quiet --pidfile $PIDFILE
        # Wait a little and remove stale PID file
        sleep 1
        if [ -f $PIDFILE ] && ! ps h `cat $PIDFILE` > /dev/null
                then
                        # Stale PID file, remove it (should be removed by
                        # jDownloader2 itself IMHO).
                        rm -f $PIDFILE
                fi
        rm -f $JDPID
        log_end_msg $?
        start_daemon
        ;;
    status)
        status_of_proc "$STATUS" "$DESC " && exit 0 || exit $?
        ;;
    *)
        log_action_msg "Usage: $SCRIPT {start|stop|restart|status}" || true
        exit 2
        ;;
esac

exit 0

Last edited by sluk; 23.03.2015 at 14:03.
Reply With Quote
  #226  
Old 23.03.2015, 13:55
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

yes, same name as jar file (eg JDownloader.jar -> JDownloader.pid)
__________________
JD-Dev & Server-Admin
Reply With Quote
  #227  
Old 23.03.2015, 20:10
Turgay
Guest
 
Posts: n/a
Default

Im using Zyxel 310s and i have followed T_Send's instructions with sluk's latest script update. I get below error message when i try to execute the script. I guess the directory "lsb" and the file init-functions doesnt exists!? How can i solved?

/etc/init.d/jdownloader: .: line 27: can't open '/lib/lsb/init-functions'
Reply With Quote
  #228  
Old 24.03.2015, 09:53
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

I suggest to use this script from https://board.jdownloader.org/showth...=57446&page=10

It heavily depends on the used linux distro/available packages if the above script will work
__________________
JD-Dev & Server-Admin
Reply With Quote
  #229  
Old 24.03.2015, 18:35
Turgay
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
I suggest to use this script from **External links are only visible to Support Staff**...

It heavily depends on the used linux distro/available packages if the above script will work
Thank you...
Reply With Quote
  #230  
Old 27.03.2015, 09:39
spuntiga
Guest
 
Posts: n/a
Default

Hello,

since I have changed my JD startup script to this script -> **External links are only visible to Support Staff**... (suggested by Jiaz) the extraction isn´t working anymore, it only shows "extraction error". I´m running JD with the synology admin (not root) user. This user is also the owner of the extraction folder.

How do i provide the log file? I have only found the description for the full installation.
Reply With Quote
  #231  
Old 27.03.2015, 15:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

The logs are within your JDownloader folder. Easiest way is to zip the log folder and send via email to support@jdownloader.org
Sure all folders have set the correct permissions?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #232  
Old 27.03.2015, 20:36
spuntiga
Guest
 
Posts: n/a
Default

Thank you for your respond, i have fixed it short after i wrote the last post.
It was indeed a permission problem, I had to set the group permission.
Reply With Quote
  #233  
Old 28.03.2015, 10:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

thanks for the feedback
__________________
JD-Dev & Server-Admin
Reply With Quote
  #234  
Old 29.03.2015, 09:46
Spawny
Guest
 
Posts: n/a
Default

latest version suddenly is not loading with my uploaded account (Synology)
deactivated/activated and deleted/recreated account a few times, restartet JD and even restarted my Synology: Nothing helps.
JD is trying to load free and solve captchas all the time, not using prem.
Reply With Quote
  #235  
Old 29.03.2015, 15:57
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

Please provide a logfile. What account status has the account? enough traffic available on account?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #236  
Old 30.03.2015, 00:43
Spawny
Guest
 
Posts: n/a
Default

prem, 350gb available
download started normaly as prem and suddenly only wants to download free

Last edited by Jiaz; 30.03.2015 at 11:23.
Reply With Quote
  #237  
Old 30.03.2015, 11:22
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

api.uploaded.net/81.171.123.200:443|Network is unreachable
Gehe mal zu Settings-Plugins. suche nach uploaded und schalte die API ab
__________________
JD-Dev & Server-Admin
Reply With Quote
  #238  
Old 30.03.2015, 17:58
Spawny
Guest
 
Posts: n/a
Default

Wo finde ich die Option in der myJdownloader-Weboberfläche?
Über die Suche in "Profieinstellungen" und auch beim durchscrollen hab ich nichts gefunden, oder ich bin blind?^^
Reply With Quote
  #239  
Old 30.03.2015, 18:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

Laut UL Support sollte das Problem seit heute fixed sein.
Ansonsten brauchst du nichts machen, das neuste Plugin kümmert sich selbst um das abschalten in genannten Fällen.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #240  
Old 30.03.2015, 19:53
Spawny
Guest
 
Posts: n/a
Default

funktioniert aber immernoch nicht.
JDl ist updated und auch nochmal alles neu gestartet, versucht immernoch captchas zu erkennen...
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 07: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 - 2023, Jelsoft Enterprises Ltd.