Getting Deluge To Start On Reboot (Synology NAS)
Re: Getting Deluge To Start On Reboot (Synology NAS)
You mean make a script that calls the start script, rather than just calling the start script? Why would that make a difference? I'm really not a linux person, but to put that in Windows terms - calling a batch file, or calling a batch file that calls a batch file...sounds like the same result to me
Re: Getting Deluge To Start On Reboot (Synology NAS)
it would just be for testing.
best bet is adding it directly to debian:
http://www.debian-administration.org/articles/28
though I haven't tried it my self.
best bet is adding it directly to debian:
http://www.debian-administration.org/articles/28
though I haven't tried it my self.
Re: Getting Deluge To Start On Reboot (Synology NAS)
I've already done that. Please see my very first post in this thread.
Re: Getting Deluge To Start On Reboot (Synology NAS)
Don't know if this will help you, but worked for me.
I had to change the file ownership of the log file directory to the username I put in "/etc/init.d/deluge-daemon"
i.e.
Cheers, Ian
I had to change the file ownership of the log file directory to the username I put in "/etc/init.d/deluge-daemon"
i.e.
Code: Select all
sudo chown -R <USERNAME>:<USERNAME> /var/log/deluge
Re: Getting Deluge To Start On Reboot (Synology NAS)
Already is that way. The startup script I'm using is this one: http://dev.deluge-torrent.org/wiki/User ... ipt/Ubuntu, which I have running as root - and /var/log/deluge is owned by root. That's what u mean, right?
So u actually do have it starting up automatically on reboot? If so, mind sharing your startup script (if different from the link above)?
So u actually do have it starting up automatically on reboot? If so, mind sharing your startup script (if different from the link above)?
-
- New User
- Posts: 3
- Joined: Thu Feb 20, 2014 2:29 am
Re: Getting Deluge To Start On Reboot (Synology NAS)
Sorry to bring this up, but this thread is shown by google as first result so I think it might come in handy for other people trying to solve this problem.
I've done these things to run deluge at boot:
1) vi /usr/syno/etc/rc.d/S92delugeweb.sh
2) paste this script
case $1 in
start)
chroot /volume1/debianchrootdir/ su - yourusername -c "/usr/bin/deluged"
chroot /volume1/debianchrootdir/ su - yourusername -c "/usr/bin/deluge-web --fork"
;;
stop)
pkill -f "/usr/bin/python /usr/bin/deluged"
pkill -f "/usr/bin/python /usr/bin/deluge-web --fork"
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac
3) save the file and chmod 755 /usr/syno/etc/rc.d/S92delugeweb.sh
4) vi ~.config/deluge/web.conf
5) replace "default_daemon": "" with "default_daemon": "127.0.0.1:58846"
6) save and chmod 444 ~.config/deluge/web.conf
7) reboot and watch the magic
updated deluge-web and pkill
I've done these things to run deluge at boot:
1) vi /usr/syno/etc/rc.d/S92delugeweb.sh
2) paste this script
case $1 in
start)
chroot /volume1/debianchrootdir/ su - yourusername -c "/usr/bin/deluged"
chroot /volume1/debianchrootdir/ su - yourusername -c "/usr/bin/deluge-web --fork"
;;
stop)
pkill -f "/usr/bin/python /usr/bin/deluged"
pkill -f "/usr/bin/python /usr/bin/deluge-web --fork"
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac
3) save the file and chmod 755 /usr/syno/etc/rc.d/S92delugeweb.sh
4) vi ~.config/deluge/web.conf
5) replace "default_daemon": "" with "default_daemon": "127.0.0.1:58846"
6) save and chmod 444 ~.config/deluge/web.conf
7) reboot and watch the magic
updated deluge-web and pkill
Last edited by kevinman117 on Fri Feb 28, 2014 10:52 am, edited 1 time in total.
Re: Getting Deluge To Start On Reboot (Synology NAS)
Uhmmm...ok, so this seems to have caused me a big problem. The script indeed caused deluge to launch on reboot (note: my chrootdir was /usr/local/debian-chroot/var/chroottarget)...BUT...nothing else comes up! In other words, I can access Deluge from the thin client, but DSM never finishes booting - I can't access the web interface NOR ssh, and so I have no way to get into the device to turn this back off.kevinman117 wrote: I've done these things to run deluge at boot:
1) vi /usr/syno/etc/rc.d/S92delugeweb.sh
2) paste this script
case $1 in
start)
chroot /volume1/debianchrootdir/ su - yourusername -c "/usr/bin/deluged"
chroot /volume1/debianchrootdir/ su - yourusername -c "/usr/bin/deluge-web"
;;
stop)
pkill deluge*
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac
3) save the file and chmod 755 /usr/syno/etc/rc.d/S92delugeweb.sh
What on earth should I do now? I don't have physical access to the device, but I called someone who's there and had them hard reboot it, same thing: Deluge comes up, but nothing else.
Re: Getting Deluge To Start On Reboot (Synology NAS)
Well that was a nightmare. You forgot a *critical* switch: you need to specify the --fork parameter to deluge-web, otherwise it won't terminate, nor will the start script, and thus, the device will lock up and not finish booting. I was only able to fix this by pulling the drive, hooking it up to another linux machine, & renaming the deluge binaries (so that when I put it back in the DiskStation they'd fail to start, and the script would terminate & DSM would boot).
So...the start script should be:
case $1 in
start)
chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/usr/bin/deluged"
chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/usr/bin/deluge-web --fork"
;;
stop)
pkill deluge*
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac
So...the start script should be:
case $1 in
start)
chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/usr/bin/deluged"
chroot /usr/local/debian-chroot/var/chroottarget su - root -c "/usr/bin/deluge-web --fork"
;;
stop)
pkill deluge*
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac
-
- New User
- Posts: 3
- Joined: Thu Feb 20, 2014 2:29 am
Re: Getting Deluge To Start On Reboot (Synology NAS)
Sorry guys, I swear I've tested the script before posting it here! Yesterday I've got the same problem: deluge runs fine, but DSM not... Then I sshed into the nas and disabled the script. Then DSM was able to start. It's weird that the lock-ups occurred occasionally. But thanks for improving/correcting my script metal450!
Updated previous post
Updated previous post
Re: Getting Deluge To Start On Reboot (Synology NAS)
to use my synology shared folder bt2 is this command right?
will all torrent data be available in /volume2/bt2/ dir?
Code: Select all
mount -o bind /volume2/bt2/ /volume2/@appstore/debian-chroot/var/chroottarget/volume2/bt2/