3
# Short-Description: init script for Transmission Daemon
4
# Description: init script for Transmission Daemon
12
PATH=/usr/sbin:/usr/bin:/sbin:/bin
13
DESC="Transmission Daemon"
14
NAME=transmission-daemon
15
DAEMON=/usr/bin/transmission-daemon
18
PIDFILE=/var/run/$NAME.pid
19
SCRIPTNAME=/etc/init.d/$NAME
21
. /lib/lsb/init-functions
25
log_daemon_msg "Starting up" "Transmission Torrent Service !!"
28
# 0 if daemon has been started
29
# 1 if daemon was already running
30
# 2 if daemon could not be started
31
start-stop-daemon --start --quiet --background --chdir $DAEMONPATH --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
33
start-stop-daemon --start --quiet --background --chdir $DAEMONPATH --pidfile $PIDFILE --exec $DAEMON -- \
36
# Add code here, if necessary, that waits for the process to be ready
37
# to handle requests from services started subsequently which depend
38
# on this one. As a last resort, sleep for some time.
43
log_daemon_msg "Shutting down " "Transmission Torrent Service !!"
45
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
53
echo "Usage: /etc/init.d/transmissiond {start|stop|restart|force-reload}"