e8abbcb56f
-Add rc script in transmission-daemon. [1] Requested by: many [1] Submitted by: a few (all of those are incomplete) [1]
43 lines
1.3 KiB
Bash
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"
|