установка и обновление TorrServer

установка и обновление TorrServer

Al


вставить в консоль сервера и нажать Enter

apt-get update |apt-get install curl -y
dir="/opt/torrserver"
mkdir -p ${dir}
architecture=""
case $(uname -m) in
 i386) architecture="386" ;;
 i686) architecture="386" ;;
 x86_64) architecture="amd64" ;;
 arm)  dpkg --print-architecture | grep -q "arm64" && architecture="arm64" || architecture="arm7" ;;
esac

url=$(curl --silent https://github.com/YouROK/TorrServer/releases/ | grep TorrServer-linux-${architecture} | head -1 | awk -F \" '{print $2}')
wget -O ${dir}/torrserver https://github.com/${url}
chmod +x ${dir}/torrserver
cat << EOF > /etc/systemd/system/torrserver.service
[Unit]
Description = TorrServer
After = network.target

[Service]
User = root
Group = root
#Environment="GODEBUG=madvdontneed=1"
Type = simple
NonBlocking = true
ExecStart = ${dir}/torrserver -d ${dir} -p 8090
ExecReload = /bin/kill -HUP \${MAINPID}
ExecStop = /bin/kill -INT \${MAINPID}
TimeoutSec = 30
WorkingDirectory = ${dir}
Restart = on-failure
RestartSec = 5s
#LimitNOFILE = 4096

[Install]
WantedBy = multi-user.target
EOF
systemctl daemon-reload
systemctl start torrserver.service
systemctl enable torrserver.service
echo -e "\nTorrServer Online - installation is complete\n" >/dev/pts

Обновление - Update


вставить в консоль сервера и нажать Enter


dir="/opt/torrserver"
bin="torrserver"
systemctl stop torrserver.service
rm -r ${dir}/${bin}
dir="/opt/torrserver"
mkdir -p ${dir}
architecture=""
case $(uname -m) in
 i386) architecture="386" ;;
 i686) architecture="386" ;;
 x86_64) architecture="amd64" ;;
 arm)  dpkg --print-architecture | grep -q "arm64" && architecture="arm64" || architecture="arm7" ;;
esac
url=$(curl --silent https://github.com/YouROK/TorrServer/releases/ | grep TorrServer-linux-${architecture} | head -1 | awk -F \" '{print $2}')
wget -O ${dir}/${bin} https://github.com/${url}
chmod +x ${dir}/${bin}
systemctl start torrserver.service
echo -e "\nTorrServer Online - update completed\n" >/dev/pts/0



расширение для браузеров на основе Chrome

Авторизация (если используется сервером) осуществляется средствами браузера - перед использованием аддона залогиньтесь в веб интерфейсе TorrServer'а и согласитесь с предложением браузера сохранить пароль.

https://chrome.google.com/webstore/detail/torrserver-adder/ihphookhabmjbgccflngglmidjloeefg

Report Page