Commit 8f897bf4 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Enable Transmission web interface for local network by default

parent dbceb66d
......@@ -169,7 +169,7 @@ function check_status
# Transmission
TRANSMISSION_STATUS="$(check_if_installed transmission-daemon && echo "on" || echo "off" )"
alive_port "Torrent download server" "9091" "boolean"
alive_port "Torrent download server" "9091"
LIST+=( "Transmission" "$DESCRIPTION" "$TRANSMISSION_STATUS" )
......@@ -748,15 +748,16 @@ install_transmission ()
#
install_packet "debconf-utils unzip build-essential html2text apt-transport-https" "Downloading dependencies"
install_packet "transmission-cli transmission-common transmission-daemon" "Install torrent server"
# systemd workaround
# https://forum.armbian.com/index.php?/topic/4017-programs-does-not-start-automatically-at-boot/
sed -e 's/exit 0//g' -i /etc/rc.local
cat >> /etc/rc.local <<"EOF"
service transmission-daemon stop
local A=(${serverIP//./ })
local servernetwork="${A[0]}.${A[1]}.*.*"
sed "s/\"rpc-whitelist\": \"127.0.0.1.*/\"rpc-whitelist\": \"127.0.0.1,$servernetwork\"/" -i /etc/transmission-daemon/settings.json
sed "s/\"rpc-whitelist\": \"127.0.0.1.*/\"rpc-whitelist\": \"127.0.0.1,$servernetwork\",/" -i /etc/transmission-daemon/settings.json
service transmission-daemon start
# systemd workaround
# https://forum.armbian.com/index.php?/topic/4017-programs-does-not-start-automatically-at-boot/
sed -e 's/exit 0//g' -i /etc/rc.local
cat >> /etc/rc.local <<"EOF"
service transmission-daemon restart
exit 0
EOF
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment