|
@ -46,6 +46,7 @@ transmission() { |
|
|
local USE |
|
|
local USE |
|
|
|
|
|
|
|
|
local user |
|
|
local user |
|
|
|
|
|
local group |
|
|
local config_overwrite |
|
|
local config_overwrite |
|
|
local download_dir config_dir |
|
|
local download_dir config_dir |
|
|
local mem_percentage |
|
|
local mem_percentage |
|
@ -56,6 +57,7 @@ transmission() { |
|
|
|
|
|
|
|
|
config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission' |
|
|
config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission' |
|
|
config_get user "$cfg" 'user' |
|
|
config_get user "$cfg" 'user' |
|
|
|
|
|
config_get group "$cfg" 'group' |
|
|
config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission' |
|
|
config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission' |
|
|
config_get mem_percentage "$cfg" 'mem_percentage' '50' |
|
|
config_get mem_percentage "$cfg" 'mem_percentage' '50' |
|
|
config_get config_overwrite "$cfg" config_overwrite 1 |
|
|
config_get config_overwrite "$cfg" config_overwrite 1 |
|
@ -71,7 +73,7 @@ transmission() { |
|
|
mkdir -p $config_dir |
|
|
mkdir -p $config_dir |
|
|
chmod 0755 $config_dir |
|
|
chmod 0755 $config_dir |
|
|
touch $config_file |
|
|
touch $config_file |
|
|
[ -z "$user" ] || chown -R "$user:$user" $config_dir |
|
|
|
|
|
|
|
|
[ -z "$user" ] || chown -R "$user:$group" $config_dir |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[ "$config_overwrite" == 0 ] || { |
|
|
[ "$config_overwrite" == 0 ] || { |
|
@ -99,7 +101,7 @@ transmission() { |
|
|
append_params_quotes "$cfg" \ |
|
|
append_params_quotes "$cfg" \ |
|
|
blocklist_url bind_address_ipv4 bind_address_ipv6 download_dir incomplete_dir \ |
|
|
blocklist_url bind_address_ipv4 bind_address_ipv6 download_dir incomplete_dir \ |
|
|
peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \ |
|
|
peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \ |
|
|
rpc_username rpc_whitelist script_torrent_done_filename watch_dir |
|
|
|
|
|
|
|
|
rpc_username rpc_host_whitelist rpc_whitelist script_torrent_done_filename watch_dir |
|
|
|
|
|
|
|
|
echo "\"invalid-key\": false" >> $config_file |
|
|
echo "\"invalid-key\": false" >> $config_file |
|
|
echo "}" >> $config_file |
|
|
echo "}" >> $config_file |
|
@ -111,7 +113,7 @@ transmission() { |
|
|
procd_set_param command $cmdline |
|
|
procd_set_param command $cmdline |
|
|
procd_set_param env CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt |
|
|
procd_set_param env CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt |
|
|
procd_set_param user $user |
|
|
procd_set_param user $user |
|
|
procd_set_param group $user |
|
|
|
|
|
|
|
|
procd_set_param group $group |
|
|
procd_set_param nice $nice |
|
|
procd_set_param nice $nice |
|
|
procd_set_param respawn retry=60 |
|
|
procd_set_param respawn retry=60 |
|
|
|
|
|
|
|
|