From: Ian Kelling Date: Thu, 4 Dec 2025 18:49:44 +0000 (-0500) Subject: fix transmission X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=500e5b543818fc4a9f01bf4448819cc5b91cd217;p=distro-setup fix transmission --- diff --git a/distro-end b/distro-end index c66ce7e..496c7c5 100755 --- a/distro-end +++ b/distro-end @@ -64,7 +64,7 @@ end() { } pre="${0##*/}:" sudo() { - printf "$pre sudo %s\n" "$*" + if [[ -t 1 ]]; then printf "$pre sudo %s\n" "$*"; fi SUDOD="$PWD" command sudo "$@"; } m() { printf "$pre %s\n" "$*"; "$@"; } @@ -123,6 +123,9 @@ sudo rm -fv /etc/apt/sources.list.d/wireguard-ubuntu-wireguard-bionic.list # remove old file sudo rm -fv /etc/apt/preferences.d/minetest + + + #### initial packages pup if isdeb; then @@ -1460,7 +1463,7 @@ done # /etc/transmission-daemon/README.json: #Currently transmission overwrites the settings.json configuration file -# on exit. The daemon can be instructed to reload the config with a SIGHUP, +# on start & exit. The daemon can be instructed to reload the config with a SIGHUP, # or # # invoke-rc.d transmission-daemon reload @@ -1484,6 +1487,7 @@ done tr-config-daemon() { d_host_suffix=$(awk '$2 == "'$d_host'" {print $1}' /p/c/host-info) u ~/.config/transmission-daemon-iank.rb <$tmpf; then + chmod +x ~/.config/transmission-daemon-iank.rb + if ! sudo ~/.config/transmission-daemon-iank.rb >$tmpf; then echo "iank ruby transmission error" >&2 return 1 fi + # shellcheck disable=SC2154 # false positive if ! sudo diff -q $tmpf $tconf_dir/settings.json &>/dev/null; then restart_ser=false @@ -1526,6 +1532,7 @@ EOF fi sudo dd of=$tconf_dir/settings.json <$tmpf 2>/dev/null if $restart_ser; then + sudo cat $tconf_dir/settings.json #debug m ser start $ser fi fi @@ -1535,8 +1542,8 @@ tr-config-daemon case $HOSTNAME in $d_host) sgo transmission-daemon-nn -;; - esac + ;; +esac ####### end transmission @@ -1576,7 +1583,7 @@ if [[ -e /p/transmission-rpc-pass ]]; then "profile-name" : "Default", "hostname" : "10.174.$d_host_suffix.2", "rpc-url-path" : "/transmission/rpc", - "username" : "", + "username" : "transmission", "password" : "$rpc_pass", "auto-connect" : true, "ssl" : false,