Различия
Показаны различия между двумя версиями страницы.
— | rtorrent [2025/07/06 12:39] (текущий) – создано - внешнее изменение 127.0.0.1 | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | ====== RTorrent консольный BitTorrent клиент ====== | ||
+ | **rtorrent** - консольный клиент P2P. Домашняя страница [[https:// | ||
+ | |||
+ | Запуск rtorrent через [[screen]]: | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/sh | ||
+ | ############# | ||
+ | ###< | ||
+ | ############# | ||
+ | # This script depends on screen. | ||
+ | # For the stop function to work, you must set an | ||
+ | # explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc. | ||
+ | # If you typically just start rtorrent with just " | ||
+ | # command line, all you need to change is the " | ||
+ | # Attach to the screen session as your user with | ||
+ | # " | ||
+ | # Licensed under the GPLv2 by lostnihilist: | ||
+ | ############## | ||
+ | ###</ | ||
+ | ############## | ||
+ | |||
+ | ####################### | ||
+ | ##Start Configuration## | ||
+ | ####################### | ||
+ | # You can specify your configuration in a different file | ||
+ | # (so that it is saved with upgrades, saved in your home directory, | ||
+ | # or whateve reason you want to) | ||
+ | # by commenting out/ | ||
+ | # in a text file (say / | ||
+ | # have written them here (you can leave the comments if you desire | ||
+ | # and then uncommenting the following line correcting the path/ | ||
+ | # for the one you used. note the space after the " | ||
+ | # . / | ||
+ | |||
+ | #Do not put a space on either side of the equal signs e.g. | ||
+ | # user = user | ||
+ | # will not work | ||
+ | # system user to run as | ||
+ | user=" | ||
+ | |||
+ | # the system group to run as, not implemented, | ||
+ | # group=`id -ng " | ||
+ | |||
+ | # the full path to the filename where you store your rtorrent configuration | ||
+ | config=" | ||
+ | |||
+ | # set of options to run with | ||
+ | options="" | ||
+ | |||
+ | # default directory for screen, needs to be an absolute path | ||
+ | base=" | ||
+ | |||
+ | # name of screen session | ||
+ | srnname=" | ||
+ | |||
+ | # file to log to (makes for easier debugging if something goes wrong) | ||
+ | logfile="/ | ||
+ | ####################### | ||
+ | ###END CONFIGURATION### | ||
+ | ####################### | ||
+ | PATH=/ | ||
+ | DESC=" | ||
+ | NAME=rtorrent | ||
+ | DAEMON=$NAME | ||
+ | SCRIPTNAME=/ | ||
+ | |||
+ | checkcnfg() { | ||
+ | exists=0 | ||
+ | for i in `echo " | ||
+ | if [ -f $i/$NAME ] ; then | ||
+ | exists=1 | ||
+ | break | ||
+ | fi | ||
+ | done | ||
+ | if [ $exists -eq 0 ] ; then | ||
+ | echo " | ||
+ | exit 3 | ||
+ | fi | ||
+ | if ! [ -r " | ||
+ | echo " | ||
+ | exit 3 | ||
+ | fi | ||
+ | session=`getsession " | ||
+ | if ! [ -d " | ||
+ | echo " | ||
+ | exit 3 | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | d_start() { | ||
+ | [ -d " | ||
+ | stty stop undef && stty start undef | ||
+ | su -c " | ||
+ | # this works for the screen command, but starting rtorrent below adopts screen session gid | ||
+ | # even if it is not the screen session we started (e.g. running under an undesirable gid | ||
+ | #su -c " | ||
+ | su -c " | ||
+ | } | ||
+ | |||
+ | d_stop() { | ||
+ | session=`getsession " | ||
+ | if ! [ -s ${session}/ | ||
+ | return | ||
+ | fi | ||
+ | pid=`cat ${session}/ | ||
+ | if ps -A | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn' | ||
+ | kill -s INT ${pid} | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | getsession() { | ||
+ | session=`cat " | ||
+ | echo $session | ||
+ | } | ||
+ | |||
+ | checkcnfg | ||
+ | |||
+ | case " | ||
+ | start) | ||
+ | echo -n " | ||
+ | d_start | ||
+ | echo " | ||
+ | ;; | ||
+ | stop) | ||
+ | echo -n " | ||
+ | d_stop | ||
+ | echo " | ||
+ | ;; | ||
+ | restart|force-reload) | ||
+ | echo -n " | ||
+ | d_stop | ||
+ | sleep 1 | ||
+ | d_start | ||
+ | echo " | ||
+ | ;; | ||
+ | *) | ||
+ | echo " | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | exit 0 | ||
+ | </ |
📌 Удобный подбор VPS по параметрам доступен на DIEGfinder.com - официальном инструменте проекта DIEG. Это часть единой экосистемы, созданной для того, чтобы помочь быстро найти подходящий VPS/VDS сервер для любых задач хостинга.
📌 Для тестирования скриптов, установщиков VPN и Python-ботов рекомендуем использовать надежные VPS на короткий срок. Подробнее о быстрой аренде VPS для экспериментов - читайте здесь.
💥 Подпишись в Телеграм 💥 и задай вопрос по сайтам и хостингам бесплатно!7 Самых Популярных Статей
- Как запустить скрипты и веб-приложения на Python
- Что такое страны TIER 1,2,3
- 7 способов сравнения файлов по содержимому в Windows или Linux
- Установка и тестирование веб-панели HestiaCP
- Nginx простые примеры конфигурации
- top, htop, atop определение загрузки ОС (Load average, LA)
- Использование rsync в примерах
7 Самых Популярных Обзоров
- Хостинг для Python-скриптов и приложений
- ТОП 4 лучших антидетект браузеров (Бесплатные & Платные)
- Подборка купонов (промокоды) на хостинг, антидетект браузеры
- Обзор THE.Hosting (PQ Hosting): надежный хостинг с профессиональной поддержкой
- Хостинг в России
- Хостинг в Европе
- Обзор браузера Dolphin {anty} для мультиаккаунтинга