I decided to go for the svn approach as detailed at the the projects website. but instead of "make install" I used checkinstall -D and manually filled in the details.
I had to change one line in /etc/init.d/transmission-daemon to reflect the different binary location (change highlighted in red):
Code:
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: transmission-daemon
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the transmission-daemon.
### END INIT INFO
NAME=transmission-daemon
DAEMON=/usr/local/bin/$NAME
USER=debian-transmission
# FIXME: no pidfile support; forks, so --make-pidfile doesn't work either
#PIDFILE=/var/run/$NAME.pid
STOP_TIMEOUT=3
export PATH="${PATH:+$PATH:}/sbin"
[ -x $DAEMON ] || exit 0
[ -e /etc/default/$NAME ] && . /etc/default/$NAME
. /lib/lsb/init-functions
start_daemon () {
if [ $ENABLE_DAEMON != 1 ]; then
log_progress_msg "(disabled, see /etc/default/${NAME})"
else
start-stop-daemon --start \
--chuid $USER \
--exec $DAEMON -- $OPTIONS
fi
}
case "$1" in
start)
log_daemon_msg "Starting bittorrent daemon" "$NAME"
start_daemon
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping bittorrent daemon" "$NAME"
start-stop-daemon --stop --quiet \
--exec $DAEMON --retry $STOP_TIMEOUT \
--oknodo
log_end_msg 0
;;
reload)
log_daemon_msg "Reloading bittorrent daemon" "$NAME"
start-stop-daemon --stop --quiet \
--exec $DAEMON \
--oknodo --signal 1
log_end_msg 0
;;
restart|force-reload)
log_daemon_msg "Restarting bittorrent daemon" "$NAME"
start-stop-daemon --stop --quiet \
--exec $DAEMON --retry $STOP_TIMEOUT \
--oknodo
start_daemon
log_end_msg 0
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart}"
exit 2
;;
esac
exit 0
Then I had to make the debian-transmission user with:
Code:
adduser --system --group --no-create-home --quiet debian-transmission
and all appears to be working so I updated rc-d to make sure it runs at boot time (I have yet to test this) with
Code:
sudo update-rc.d transmission-daemon defaults
Lastly, it remains unclear to me whether my daemon is gettin its config from which of these directories
Code:
~/.config/transmission-daemon/
/etc/transmission-daemon/
/var/lib/transmission-daemon/info/
So I copied the one I edited to suit me to all three locations like so:
Code:
sudo service transmission-daemon stop && sudo cp ~/.config/transmission-daemon/settings.json /etc/transmission-daemon/settings.json && sudo cp ~/.config/transmission-daemon/settings.json /var/lib/transmission-daemon/info/settings.json
It starts ok on reboot but fails to actually read from the watch directory or write any files even though it can connect to peers, the download directory is owned and writable by debian-transmission, grrrr... my syslog gets these before transmission-daemon gives up and pauses the torrents:
Code:
Watching "/moo/torrent/src/" for new .torrent files (daemon.c:456)
Using inotify to watch directory "/moo/torrent/src/" (watch.c:84)
Unable to watch "/moo/torrent/src/": Permission denied (watch.c:90)
--snip--
Couldn't create "/moo/torrent": Permission denied (utils.c:605)
Couldn't create "/moo/torrent/incomplete/The Ghost Of Grand Rapids": Permission denied (fdlimit.c:362)
The Ghost Of Grand Rapids tr_fdFileCheckout failed for "/moo/torrent/incomplete/The Ghost Of Grand Rapids/GhostOfGrandRapids.avi.part": Permission denied (inout.c:134)
Couldn't create "/moo/torrent": Permission denied (utils.c:605)
Couldn't create "/moo/torrent/incomplete/The Ghost Of Grand Rapids": Permission denied (fdlimit.c:362)
The Ghost Of Grand Rapids tr_fdFileCheckout failed for "/moo/torrent/incomplete/The Ghost Of Grand Rapids/GhostOfGrandRapids.avi.part": Permission denied (inout.c:134)
Any ideas guys?
Bookmarks