View Single Post
  #42  
Old 14.10.2014, 18:34
Haralt
Guest
 
Posts: n/a
Default

Thanks for the manual! Jdownloader is running flawless in headless mode
To make it autostart with my snyology NAS I created the file /usr/local/etc/rc.d/S99jdownloader.sh with this content:
Quote:
#!/bin/sh
#
# Startup script for jdownloader2
#
# Stop myself if running
PIDFILE=/var/run/S99jdownloader.pid
#
start() {
sleep 1
nohup /volume1/@appstore/JavaManager/Java/bin/java -Djava.awt.headless=true -jar /volume1/@appstore/jdownloader/JDownloader.jar &
# write pidfile
echo $! > $PIDFILE
}
#
stop() {
[ -f ${PIDFILE} ] && kill `cat ${PIDFILE}`
# remove pidfile
rm -f $PIDFILE
}
#
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "Usage: $0 (start|stop|restart)"
exit 1
;;
esac
# End
(just used a generic script from the german synology wiki tho, I'm no programmer and I'm sure it could be made much shorter)

Last edited by Haralt; 14.10.2014 at 19:00.
Reply With Quote