freebsd-ports/net-p2p/transmission-cli/files/transmission.in
Jeremy Messenger e8abbcb56f -Update to 1.72.
-Add rc script in transmission-daemon. [1]

Requested by:	many [1]
Submitted by:	a few (all of those are incomplete) [1]
2009-06-19 17:07:26 +00:00

43 lines
1.3 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: transmission
# REQUIRE: DAEMON
#
# Add the following lines to /etc/rc.conf to enable this service:
#
# transmission_enable: Set to NO by default. Set it to YES to enable it.
# transmission_watch_dir: Directory for torrent files to download
# automatically. Off by default unless you add
# a path.
# transmission_conf_dir: Directory where transmission configuration
# data is stored.
# Default: %%PREFIX%%/etc/transmission/home/.config
# transmission_download_dir: Directory to store downloaded data.
# Default: %%PREFIX%%/etc/transmission/home/Downloads
# transmission_user: The user account transmission daemon runs as what
# you want it to be. It uses 'transmission' user by
# default. Do not sets it as empty or it will run
# as root.
#
. %%RC_SUBR%%
name="transmission"
rcvar=${name}_enable
command=%%PREFIX%%/bin/transmission-daemon
load_rc_config ${name}
: ${transmission_enable:="NO"}
: ${transmission_user:="transmission"}
transmission_flags=" \
${transmission_watch_dir:+-c ${transmission_watch_dir}} \
${transmission_conf_dir:+-g ${transmission_conf_dir}} \
${transmission_download_dir:+-w ${transmission_download_dir}} \
${transmission_flags}"
run_rc_command "$1"