<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="uk">
	<id>https://wiki.welard.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=91.124.47.194&amp;*</id>
	<title>Wiki Welard - Внесок користувача [uk]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.welard.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=91.124.47.194&amp;*"/>
	<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=%D0%A1%D0%BF%D0%B5%D1%86%D1%96%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0:%D0%92%D0%BD%D0%B5%D1%81%D0%BE%D0%BA/91.124.47.194"/>
	<updated>2026-10-22T12:37:56Z</updated>
	<subtitle>Внесок користувача</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.welard.com/index.php?title=Linux&amp;diff=1799</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=Linux&amp;diff=1799"/>
		<updated>2009-05-21T13:38:28Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Операційна система &lt;br /&gt;
&lt;br /&gt;
 [[Checkinstall]]&lt;br /&gt;
 [[Fstab]]&lt;br /&gt;
 [[LDAP-configure]]&lt;br /&gt;
 [[Mail setting]]&lt;br /&gt;
 [[OpenSSL]]&lt;br /&gt;
 [[Centos Repo]]&lt;br /&gt;
 [[Centos multimedia]]&lt;br /&gt;
 [[Yum]]&lt;br /&gt;
 [[RPM]]&lt;br /&gt;
 [[Управління rpm]]&lt;br /&gt;
 [[Ssh]]&lt;br /&gt;
 [[SPF]]&lt;br /&gt;
 [[OpenVPN]]&lt;br /&gt;
 [[Nginx-as-reverse-proxy]]&lt;br /&gt;
 [[Ldap-errors]]&lt;br /&gt;
 [[DNS]]&lt;br /&gt;
 [[Iptables]]&lt;br /&gt;
 [[OpenLDAP]]&lt;br /&gt;
 [[Iptables]]&lt;br /&gt;
 [[SSL configure]]&lt;br /&gt;
 [[СentOS]]&lt;br /&gt;
 [[Php fastcgi]]&lt;br /&gt;
 [[Nginx Django]]&lt;br /&gt;
 [[Vim]]&lt;br /&gt;
 [[Захист SSH]]&lt;br /&gt;
 [[Install_FTP_Server]]&lt;br /&gt;
 [[Iftop]]&lt;br /&gt;
 [[Webmin]]&lt;br /&gt;
 [[Squid]]&lt;br /&gt;
 [[EraseDNS]]&lt;br /&gt;
 [[Rtorrent]]&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.welard.com/index.php?title=Rtorrent&amp;diff=1798</id>
		<title>Rtorrent</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=Rtorrent&amp;diff=1798"/>
		<updated>2009-05-21T13:38:07Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;rTorrent — консольный клиент BitTorrent, написанный на C++ для GNU/Linux и других UNIX‐подобных операционных систем, на основе библиотеки libTorrent (не путать с libtorrent).&lt;br /&gt;
&lt;br /&gt;
Использует библиотеку ncurses для вывода. Отличается нетребовательностью к системным ресурсам.&lt;br /&gt;
&lt;br /&gt;
rTorrent — свободное программное обеспечение, распространяемое на условиях GNU General Public License.&lt;br /&gt;
&lt;br /&gt;
Читати також [[Служба_rtorrent]]&lt;br /&gt;
&lt;br /&gt;
== Приклад настройки .rtorrent.rc ==&lt;br /&gt;
&lt;br /&gt;
 encoding_list = UTF-8&lt;br /&gt;
 min_peers = 1&lt;br /&gt;
 max_peers = 500&lt;br /&gt;
 max_uploads = 50&lt;br /&gt;
 directory = /srv/shara/torrent&lt;br /&gt;
 session = /home/andrew/.rtorrent/&lt;br /&gt;
 port_range = 6890-6890&lt;br /&gt;
 port_random = no&lt;br /&gt;
&lt;br /&gt;
 download_rate = 35&lt;br /&gt;
 upload_rate = 35&lt;br /&gt;
 schedule = watch_directory,5,5,load_start=/srv/shara/torrent/@list/*.torrent&lt;br /&gt;
 schedule = untied_directory,5,5,stop_untied=&lt;br /&gt;
 schedule = low_diskspace,5,60,close_low_diskspace=500M&lt;br /&gt;
&lt;br /&gt;
 schedule = throttle_1,01:30:00,24:00:00,download_rate=100&lt;br /&gt;
 schedule = throttle_2,01:30:00,24:00:00,upload_rate=100&lt;br /&gt;
 schedule = throttle_3,07:00:00,24:00:00,download_rate=35&lt;br /&gt;
 schedule = throttle_4,07:00:00,24:00:00,upload_rate=35&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 check_hash = yes&lt;br /&gt;
 use_udp_trackers = yes&lt;br /&gt;
 encryption = allow_incoming,try_outgoing,enable_retry&lt;br /&gt;
 #dht = auto&lt;br /&gt;
 #dht_port = 21345&lt;br /&gt;
 #peer_exchange = yes&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.welard.com/index.php?title=Rtorrent&amp;diff=1797</id>
		<title>Rtorrent</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=Rtorrent&amp;diff=1797"/>
		<updated>2009-05-21T13:36:58Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: Created page with 'rTorrent — консольный клиент BitTorrent, написанный на C++ для GNU/Linux и других UNIX‐подобных операционных сис...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;rTorrent — консольный клиент BitTorrent, написанный на C++ для GNU/Linux и других UNIX‐подобных операционных систем, на основе библиотеки libTorrent (не путать с libtorrent).&lt;br /&gt;
&lt;br /&gt;
Использует библиотеку ncurses для вывода. Отличается нетребовательностью к системным ресурсам.&lt;br /&gt;
&lt;br /&gt;
rTorrent — свободное программное обеспечение, распространяемое на условиях GNU General Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Приклад настройки .rtorrent.rc ==&lt;br /&gt;
&lt;br /&gt;
 encoding_list = UTF-8&lt;br /&gt;
 min_peers = 1&lt;br /&gt;
 max_peers = 500&lt;br /&gt;
 max_uploads = 50&lt;br /&gt;
 directory = /srv/shara/torrent&lt;br /&gt;
 session = /home/andrew/.rtorrent/&lt;br /&gt;
 port_range = 6890-6890&lt;br /&gt;
 port_random = no&lt;br /&gt;
&lt;br /&gt;
 download_rate = 35&lt;br /&gt;
 upload_rate = 35&lt;br /&gt;
 schedule = watch_directory,5,5,load_start=/srv/shara/torrent/@list/*.torrent&lt;br /&gt;
 schedule = untied_directory,5,5,stop_untied=&lt;br /&gt;
 schedule = low_diskspace,5,60,close_low_diskspace=500M&lt;br /&gt;
&lt;br /&gt;
 schedule = throttle_1,01:30:00,24:00:00,download_rate=100&lt;br /&gt;
 schedule = throttle_2,01:30:00,24:00:00,upload_rate=100&lt;br /&gt;
 schedule = throttle_3,07:00:00,24:00:00,download_rate=35&lt;br /&gt;
 schedule = throttle_4,07:00:00,24:00:00,upload_rate=35&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 check_hash = yes&lt;br /&gt;
 use_udp_trackers = yes&lt;br /&gt;
 encryption = allow_incoming,try_outgoing,enable_retry&lt;br /&gt;
 #dht = auto&lt;br /&gt;
 #dht_port = 21345&lt;br /&gt;
 #peer_exchange = yes&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1796</id>
		<title>Служба rtorrent</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1796"/>
		<updated>2009-05-21T13:35:31Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Строримо такий файлик з правами на виконання &lt;br /&gt;
&lt;br /&gt;
замість користувача andrew підставити свого &lt;br /&gt;
&lt;br /&gt;
налаштування [[rtorrent]] в /home/andrew/.rtorrent.rc &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #&lt;br /&gt;
 # chkconfig: - 95 05&lt;br /&gt;
 # description: rtorrent daemon&lt;br /&gt;
 # process name: rtorrent&lt;br /&gt;
 #&lt;br /&gt;
 # Author: Andrew G &lt;br /&gt;
 # Licensed under the GPLv2&lt;br /&gt;
 #######################&lt;br /&gt;
 ##Start Configuration##&lt;br /&gt;
 #######################&lt;br /&gt;
 # You can specify your configuration in a different file &lt;br /&gt;
 # (so that it is saved with upgrades, saved in your home directory,&lt;br /&gt;
 # or whateve reason you want to)&lt;br /&gt;
 # by commenting out/deleting the configuration lines and placing them&lt;br /&gt;
 # in a text file (say /home/user/.rtorrent.init.conf) exactly as you would&lt;br /&gt;
 # have written them here (you can leave the comments if you desire&lt;br /&gt;
 # and then uncommenting the following line correcting the path/filename &lt;br /&gt;
 # for the one you used. note the space after the &amp;quot;.&amp;quot;.&lt;br /&gt;
 # . /etc/rtorrent.init.conf&lt;br /&gt;
 #Do not put a space on either side of the equal signs e.g.&lt;br /&gt;
 # system user to run as&lt;br /&gt;
 '''user=&amp;quot;andrew&amp;quot;'''&lt;br /&gt;
 # the system group to run as, not implemented, see start for beginning implementation&lt;br /&gt;
 # group=`id -ng &amp;quot;$user&amp;quot;`&lt;br /&gt;
 # the full path to the filename where you store your rtorrent configuration&lt;br /&gt;
 config=&amp;quot;`su -c 'echo $HOME' $user`/.rtorrent.rc&amp;quot;&lt;br /&gt;
 # set of options to run with&lt;br /&gt;
 options=&amp;quot;&amp;quot;&lt;br /&gt;
 # default directory for screen, needs to be an absolute path&lt;br /&gt;
 base=&amp;quot;`su -c 'echo $HOME' $user`&amp;quot;&lt;br /&gt;
 # name of screen session&lt;br /&gt;
 srnname=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
 # file to log to (makes for easier debugging if something goes wrong)&lt;br /&gt;
 '''logfile=&amp;quot;/var/log/rtorrentInit.log&amp;quot;'''&lt;br /&gt;
 PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin&lt;br /&gt;
 DESC=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
 NAME=rtorrent&lt;br /&gt;
 DAEMON=$NAME&lt;br /&gt;
 SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 RETVAL=0&lt;br /&gt;
 checkcnfg() {&lt;br /&gt;
     exists=0&lt;br /&gt;
     for i in `echo &amp;quot;$PATH&amp;quot; | tr ':' '\n'`&amp;amp;nbsp;; do&lt;br /&gt;
         if [ -f $i/$NAME ]&amp;amp;nbsp;; then&lt;br /&gt;
             exists=1&lt;br /&gt;
             break&lt;br /&gt;
         fi&lt;br /&gt;
     done&lt;br /&gt;
     if [ $exists -eq 0 ]&amp;amp;nbsp;; then&lt;br /&gt;
         echo &amp;quot;cannot find rtorrent binary in PATH $PATH&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3&lt;br /&gt;
     fi&lt;br /&gt;
     if&amp;amp;nbsp;! [ -r &amp;quot;${config}&amp;quot; ]&amp;amp;nbsp;; then &lt;br /&gt;
         echo &amp;quot;cannot find readable config ${config}. check that it is there and permissions are appropriate&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3 &lt;br /&gt;
     fi &lt;br /&gt;
     session=`getsession &amp;quot;$config&amp;quot;` &lt;br /&gt;
     if&amp;amp;nbsp;! [ -d &amp;quot;${session}&amp;quot; ]&amp;amp;nbsp;; then&lt;br /&gt;
         echo &amp;quot;cannot find readable session directory ${session} from config ${config}. check permissions&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3&lt;br /&gt;
     fi&lt;br /&gt;
 }&lt;br /&gt;
 start() {&lt;br /&gt;
     echo -n &amp;quot;Starting $DESC: $NAME&amp;quot;&lt;br /&gt;
     [ -d &amp;quot;${base}&amp;quot; ] &amp;amp;amp;&amp;amp;amp; cd &amp;quot;${base}&amp;quot;&lt;br /&gt;
     stty stop undef &amp;amp;amp;&amp;amp;amp; stty start undef&lt;br /&gt;
     su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;screen -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     # this works for the screen command, but starting rtorrent below adopts screen session gid&lt;br /&gt;
     # even if it is not the screen session we started (e.g. running under an undesirable gid&lt;br /&gt;
     #su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;sg \&amp;quot;$group\&amp;quot; -c \&amp;quot;screen -fn -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null\&amp;quot;&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     su -c &amp;quot;screen -S &amp;quot;${srnname}&amp;quot; -X screen rtorrent ${options} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     echo_success&lt;br /&gt;
     echo&lt;br /&gt;
     RETVAL=0&lt;br /&gt;
 }&lt;br /&gt;
 stop() {&lt;br /&gt;
     echo -n &amp;quot;Stopping $DESC: $NAME&amp;quot;&lt;br /&gt;
     session=`getsession &amp;quot;$config&amp;quot;`&lt;br /&gt;
     if&amp;amp;nbsp;! [ -s ${session}/rtorrent.lock ]&amp;amp;nbsp;; then&lt;br /&gt;
         return&lt;br /&gt;
     fi&lt;br /&gt;
     pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed &amp;quot;s/[^0-9]//g&amp;quot;`&lt;br /&gt;
     if ps -A | grep -sq ${pid}.*rtorrent&amp;amp;nbsp;; then # make sure the pid doesn't belong to another process&lt;br /&gt;
         kill -s INT ${pid}&lt;br /&gt;
     fi&lt;br /&gt;
     echo_success&lt;br /&gt;
     echo&lt;br /&gt;
     RETVAL=0&lt;br /&gt;
 }&lt;br /&gt;
 getsession() { &lt;br /&gt;
     session=`cat &amp;quot;$1&amp;quot; | grep &amp;quot;^[[:space:]]*session[[:space:]]*=&amp;quot; | sed &amp;quot;s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//&amp;quot; `&lt;br /&gt;
     echo $session&lt;br /&gt;
 }&lt;br /&gt;
 checkcnfg&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
     start&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   stop)&lt;br /&gt;
     stop&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   restart|force-reload)&lt;br /&gt;
     echo -n &amp;quot;Restarting $DESC: $NAME&amp;quot;&lt;br /&gt;
     echo &lt;br /&gt;
     stop&lt;br /&gt;
     sleep 1&lt;br /&gt;
     start&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   *)&lt;br /&gt;
     echo &amp;quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     exit 1&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
 esac&lt;br /&gt;
 exit $RETVAL&lt;br /&gt;
&lt;br /&gt;
Ну і запускаємо &lt;br /&gt;
&lt;br /&gt;
 chkconfig rtorrent on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1795</id>
		<title>Служба rtorrent</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1795"/>
		<updated>2009-05-21T13:33:49Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Строримо такий файлик з правами на виконання &lt;br /&gt;
&lt;br /&gt;
замість користувача andrew підставити свого &lt;br /&gt;
&lt;br /&gt;
налаштування rtorrent в /home/andrew/.rtorrent.rc &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #&lt;br /&gt;
 # chkconfig: - 95 05&lt;br /&gt;
 # description: rtorrent daemon&lt;br /&gt;
 # process name: rtorrent&lt;br /&gt;
 #&lt;br /&gt;
 # Author: Andrew G &lt;br /&gt;
 # Licensed under the GPLv2&lt;br /&gt;
 #######################&lt;br /&gt;
 ##Start Configuration##&lt;br /&gt;
 #######################&lt;br /&gt;
 # You can specify your configuration in a different file &lt;br /&gt;
 # (so that it is saved with upgrades, saved in your home directory,&lt;br /&gt;
 # or whateve reason you want to)&lt;br /&gt;
 # by commenting out/deleting the configuration lines and placing them&lt;br /&gt;
 # in a text file (say /home/user/.rtorrent.init.conf) exactly as you would&lt;br /&gt;
 # have written them here (you can leave the comments if you desire&lt;br /&gt;
 # and then uncommenting the following line correcting the path/filename &lt;br /&gt;
 # for the one you used. note the space after the &amp;quot;.&amp;quot;.&lt;br /&gt;
 # . /etc/rtorrent.init.conf&lt;br /&gt;
 #Do not put a space on either side of the equal signs e.g.&lt;br /&gt;
 # system user to run as&lt;br /&gt;
 '''user=&amp;quot;andrew&amp;quot;'''&lt;br /&gt;
 # the system group to run as, not implemented, see start for beginning implementation&lt;br /&gt;
 # group=`id -ng &amp;quot;$user&amp;quot;`&lt;br /&gt;
 # the full path to the filename where you store your rtorrent configuration&lt;br /&gt;
 config=&amp;quot;`su -c 'echo $HOME' $user`/.rtorrent.rc&amp;quot;&lt;br /&gt;
 # set of options to run with&lt;br /&gt;
 options=&amp;quot;&amp;quot;&lt;br /&gt;
 # default directory for screen, needs to be an absolute path&lt;br /&gt;
 base=&amp;quot;`su -c 'echo $HOME' $user`&amp;quot;&lt;br /&gt;
 # name of screen session&lt;br /&gt;
 srnname=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
 # file to log to (makes for easier debugging if something goes wrong)&lt;br /&gt;
 logfile=&amp;quot;'''/var/log/rtorrentInit.log&amp;quot;'''&lt;br /&gt;
 PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin&lt;br /&gt;
 DESC=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
 NAME=rtorrent&lt;br /&gt;
 DAEMON=$NAME&lt;br /&gt;
 SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 RETVAL=0&lt;br /&gt;
 checkcnfg() {&lt;br /&gt;
     exists=0&lt;br /&gt;
     for i in `echo &amp;quot;$PATH&amp;quot; | tr ':' '\n'`&amp;amp;nbsp;; do&lt;br /&gt;
         if [ -f $i/$NAME ]&amp;amp;nbsp;; then&lt;br /&gt;
             exists=1&lt;br /&gt;
             break&lt;br /&gt;
         fi&lt;br /&gt;
     done&lt;br /&gt;
     if [ $exists -eq 0 ]&amp;amp;nbsp;; then&lt;br /&gt;
         echo &amp;quot;cannot find rtorrent binary in PATH $PATH&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3&lt;br /&gt;
     fi&lt;br /&gt;
     if&amp;amp;nbsp;! [ -r &amp;quot;${config}&amp;quot; ]&amp;amp;nbsp;; then &lt;br /&gt;
         echo &amp;quot;cannot find readable config ${config}. check that it is there and permissions are appropriate&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3 &lt;br /&gt;
     fi &lt;br /&gt;
     session=`getsession &amp;quot;$config&amp;quot;` &lt;br /&gt;
     if&amp;amp;nbsp;! [ -d &amp;quot;${session}&amp;quot; ]&amp;amp;nbsp;; then&lt;br /&gt;
         echo &amp;quot;cannot find readable session directory ${session} from config ${config}. check permissions&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3&lt;br /&gt;
     fi&lt;br /&gt;
 }&lt;br /&gt;
 start() {&lt;br /&gt;
     echo -n &amp;quot;Starting $DESC: $NAME&amp;quot;&lt;br /&gt;
     [ -d &amp;quot;${base}&amp;quot; ] &amp;amp;amp;&amp;amp;amp; cd &amp;quot;${base}&amp;quot;&lt;br /&gt;
     stty stop undef &amp;amp;amp;&amp;amp;amp; stty start undef&lt;br /&gt;
     su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;screen -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     # this works for the screen command, but starting rtorrent below adopts screen session gid&lt;br /&gt;
     # even if it is not the screen session we started (e.g. running under an undesirable gid&lt;br /&gt;
     #su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;sg \&amp;quot;$group\&amp;quot; -c \&amp;quot;screen -fn -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null\&amp;quot;&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     su -c &amp;quot;screen -S &amp;quot;${srnname}&amp;quot; -X screen rtorrent ${options} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     echo_success&lt;br /&gt;
     echo&lt;br /&gt;
     RETVAL=0&lt;br /&gt;
 }&lt;br /&gt;
 stop() {&lt;br /&gt;
     echo -n &amp;quot;Stopping $DESC: $NAME&amp;quot;&lt;br /&gt;
     session=`getsession &amp;quot;$config&amp;quot;`&lt;br /&gt;
     if&amp;amp;nbsp;! [ -s ${session}/rtorrent.lock ]&amp;amp;nbsp;; then&lt;br /&gt;
         return&lt;br /&gt;
     fi&lt;br /&gt;
     pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed &amp;quot;s/[^0-9]//g&amp;quot;`&lt;br /&gt;
     if ps -A | grep -sq ${pid}.*rtorrent&amp;amp;nbsp;; then # make sure the pid doesn't belong to another process&lt;br /&gt;
         kill -s INT ${pid}&lt;br /&gt;
     fi&lt;br /&gt;
     echo_success&lt;br /&gt;
     echo&lt;br /&gt;
     RETVAL=0&lt;br /&gt;
 }&lt;br /&gt;
 getsession() { &lt;br /&gt;
     session=`cat &amp;quot;$1&amp;quot; | grep &amp;quot;^[[:space:]]*session[[:space:]]*=&amp;quot; | sed &amp;quot;s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//&amp;quot; `&lt;br /&gt;
     echo $session&lt;br /&gt;
 }&lt;br /&gt;
 checkcnfg&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
     start&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   stop)&lt;br /&gt;
     stop&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   restart|force-reload)&lt;br /&gt;
     echo -n &amp;quot;Restarting $DESC: $NAME&amp;quot;&lt;br /&gt;
     echo &lt;br /&gt;
     stop&lt;br /&gt;
     sleep 1&lt;br /&gt;
     start&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   *)&lt;br /&gt;
     echo &amp;quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     exit 1&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
 esac&lt;br /&gt;
 exit $RETVAL&lt;br /&gt;
&lt;br /&gt;
Ну і запускаємо &lt;br /&gt;
&lt;br /&gt;
 chkconfig rtorrent on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1794</id>
		<title>Служба rtorrent</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1794"/>
		<updated>2009-05-21T13:32:40Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Строримо такий файлик з правами на виконання &lt;br /&gt;
&lt;br /&gt;
замість користувача andrew підставити свого &lt;br /&gt;
&lt;br /&gt;
налаштування rtorrent в /home/andrew/.rtorrent.rc &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #&lt;br /&gt;
 # chkconfig: - 95 05&lt;br /&gt;
 # description: rtorrent daemon&lt;br /&gt;
 # process name: rtorrent&lt;br /&gt;
 #&lt;br /&gt;
 #&lt;br /&gt;
 # Author: Andrew G &lt;br /&gt;
 # Licensed under the GPLv2&lt;br /&gt;
&lt;br /&gt;
 #######################&lt;br /&gt;
 ##Start Configuration##&lt;br /&gt;
 #######################&lt;br /&gt;
 # You can specify your configuration in a different file &lt;br /&gt;
 # (so that it is saved with upgrades, saved in your home directory,&lt;br /&gt;
 # or whateve reason you want to)&lt;br /&gt;
 # by commenting out/deleting the configuration lines and placing them&lt;br /&gt;
 # in a text file (say /home/user/.rtorrent.init.conf) exactly as you would&lt;br /&gt;
 # have written them here (you can leave the comments if you desire&lt;br /&gt;
 # and then uncommenting the following line correcting the path/filename &lt;br /&gt;
 # for the one you used. note the space after the &amp;quot;.&amp;quot;.&lt;br /&gt;
 # . /etc/rtorrent.init.conf&lt;br /&gt;
&lt;br /&gt;
 #Do not put a space on either side of the equal signs e.g.&lt;br /&gt;
 # system user to run as&lt;br /&gt;
 user=&amp;quot;andrew&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # the system group to run as, not implemented, see start for beginning implementation&lt;br /&gt;
 # group=`id -ng &amp;quot;$user&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
 # the full path to the filename where you store your rtorrent configuration&lt;br /&gt;
 config=&amp;quot;`su -c 'echo $HOME' $user`/.rtorrent.rc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # set of options to run with&lt;br /&gt;
 options=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # default directory for screen, needs to be an absolute path&lt;br /&gt;
 base=&amp;quot;`su -c 'echo $HOME' $user`&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # name of screen session&lt;br /&gt;
 srnname=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # file to log to (makes for easier debugging if something goes wrong)&lt;br /&gt;
 logfile=&amp;quot;'''/var/log/rtorrentInit.log&amp;quot;'''&lt;br /&gt;
 PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin&lt;br /&gt;
 DESC=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
 NAME=rtorrent&lt;br /&gt;
 DAEMON=$NAME&lt;br /&gt;
 SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
&lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 RETVAL=0&lt;br /&gt;
 checkcnfg() {&lt;br /&gt;
     exists=0&lt;br /&gt;
     for i in `echo &amp;quot;$PATH&amp;quot; | tr ':' '\n'`&amp;amp;nbsp;; do&lt;br /&gt;
         if [ -f $i/$NAME ]&amp;amp;nbsp;; then&lt;br /&gt;
             exists=1&lt;br /&gt;
             break&lt;br /&gt;
         fi&lt;br /&gt;
     done&lt;br /&gt;
     if [ $exists -eq 0 ]&amp;amp;nbsp;; then&lt;br /&gt;
         echo &amp;quot;cannot find rtorrent binary in PATH $PATH&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3&lt;br /&gt;
     fi&lt;br /&gt;
     if&amp;amp;nbsp;! [ -r &amp;quot;${config}&amp;quot; ]&amp;amp;nbsp;; then &lt;br /&gt;
         echo &amp;quot;cannot find readable config ${config}. check that it is there and permissions are appropriate&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3 &lt;br /&gt;
     fi &lt;br /&gt;
     session=`getsession &amp;quot;$config&amp;quot;` &lt;br /&gt;
     if&amp;amp;nbsp;! [ -d &amp;quot;${session}&amp;quot; ]&amp;amp;nbsp;; then&lt;br /&gt;
         echo &amp;quot;cannot find readable session directory ${session} from config ${config}. check permissions&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
         exit 3&lt;br /&gt;
     fi&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 start() {&lt;br /&gt;
     echo -n &amp;quot;Starting $DESC: $NAME&amp;quot;&lt;br /&gt;
     [ -d &amp;quot;${base}&amp;quot; ] &amp;amp;amp;&amp;amp;amp; cd &amp;quot;${base}&amp;quot;&lt;br /&gt;
     stty stop undef &amp;amp;amp;&amp;amp;amp; stty start undef&lt;br /&gt;
     su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;screen -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     # this works for the screen command, but starting rtorrent below adopts screen session gid&lt;br /&gt;
     # even if it is not the screen session we started (e.g. running under an undesirable gid&lt;br /&gt;
     #su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;sg \&amp;quot;$group\&amp;quot; -c \&amp;quot;screen -fn -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null\&amp;quot;&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     su -c &amp;quot;screen -S &amp;quot;${srnname}&amp;quot; -X screen rtorrent ${options} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     echo_success&lt;br /&gt;
     echo&lt;br /&gt;
     RETVAL=0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 stop() {&lt;br /&gt;
     echo -n &amp;quot;Stopping $DESC: $NAME&amp;quot;&lt;br /&gt;
     session=`getsession &amp;quot;$config&amp;quot;`&lt;br /&gt;
     if&amp;amp;nbsp;! [ -s ${session}/rtorrent.lock ]&amp;amp;nbsp;; then&lt;br /&gt;
         return&lt;br /&gt;
     fi&lt;br /&gt;
     pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed &amp;quot;s/[^0-9]//g&amp;quot;`&lt;br /&gt;
     if ps -A | grep -sq ${pid}.*rtorrent&amp;amp;nbsp;; then # make sure the pid doesn't belong to another process&lt;br /&gt;
         kill -s INT ${pid}&lt;br /&gt;
     fi&lt;br /&gt;
     echo_success&lt;br /&gt;
     echo&lt;br /&gt;
     RETVAL=0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 getsession() { &lt;br /&gt;
     session=`cat &amp;quot;$1&amp;quot; | grep &amp;quot;^[[:space:]]*session[[:space:]]*=&amp;quot; | sed &amp;quot;s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//&amp;quot; `&lt;br /&gt;
     echo $session&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 checkcnfg&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
     start&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   stop)&lt;br /&gt;
     stop&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   restart|force-reload)&lt;br /&gt;
     echo -n &amp;quot;Restarting $DESC: $NAME&amp;quot;&lt;br /&gt;
     echo &lt;br /&gt;
     stop&lt;br /&gt;
     sleep 1&lt;br /&gt;
     start&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
   *)&lt;br /&gt;
     echo &amp;quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
     exit 1&lt;br /&gt;
    &amp;amp;nbsp;;;&lt;br /&gt;
 esac&lt;br /&gt;
 exit $RETVAL&lt;br /&gt;
&lt;br /&gt;
Ну і запускаємо &lt;br /&gt;
&lt;br /&gt;
 chkconfig rtorrent on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1793</id>
		<title>Служба rtorrent</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1793"/>
		<updated>2009-05-21T13:28:02Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Строримо такий файлик з правами на виконання &lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# chkconfig: - 95 05&lt;br /&gt;
# description: rtorrent daemon&lt;br /&gt;
# process name: rtorrent&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
# Author: Andrew G &lt;br /&gt;
# Licensed under the GPLv2&lt;br /&gt;
&lt;br /&gt;
#######################&lt;br /&gt;
##Start Configuration##&lt;br /&gt;
#######################&lt;br /&gt;
# You can specify your configuration in a different file &lt;br /&gt;
# (so that it is saved with upgrades, saved in your home directory,&lt;br /&gt;
# or whateve reason you want to)&lt;br /&gt;
# by commenting out/deleting the configuration lines and placing them&lt;br /&gt;
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would&lt;br /&gt;
# have written them here (you can leave the comments if you desire&lt;br /&gt;
# and then uncommenting the following line correcting the path/filename &lt;br /&gt;
# for the one you used. note the space after the &amp;quot;.&amp;quot;.&lt;br /&gt;
# . /etc/rtorrent.init.conf&lt;br /&gt;
&lt;br /&gt;
#Do not put a space on either side of the equal signs e.g.&lt;br /&gt;
# system user to run as&lt;br /&gt;
user=&amp;quot;'''andrew'''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# the system group to run as, not implemented, see start for beginning implementation&lt;br /&gt;
# group=`id -ng &amp;quot;$user&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
# the full path to the filename where you store your rtorrent configuration&lt;br /&gt;
config=&amp;quot;`su -c 'echo $HOME' $user`/.rtorrent.rc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# set of options to run with&lt;br /&gt;
options=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# default directory for screen, needs to be an absolute path&lt;br /&gt;
base=&amp;quot;`su -c 'echo $HOME' $user`&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# name of screen session&lt;br /&gt;
srnname=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# file to log to (makes for easier debugging if something goes wrong)&lt;br /&gt;
logfile=&amp;quot;/var/log/rtorrentInit.log&amp;quot;&lt;br /&gt;
&lt;br /&gt;
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin&lt;br /&gt;
DESC=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
NAME=rtorrent&lt;br /&gt;
DAEMON=$NAME&lt;br /&gt;
SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
&lt;br /&gt;
. /etc/init.d/functions&lt;br /&gt;
RETVAL=0&lt;br /&gt;
checkcnfg() {&lt;br /&gt;
    exists=0&lt;br /&gt;
    for i in `echo &amp;quot;$PATH&amp;quot; | tr ':' '\n'`&amp;amp;nbsp;; do&lt;br /&gt;
        if [ -f $i/$NAME ]&amp;amp;nbsp;; then&lt;br /&gt;
            exists=1&lt;br /&gt;
            break&lt;br /&gt;
        fi&lt;br /&gt;
    done&lt;br /&gt;
    if [ $exists -eq 0 ]&amp;amp;nbsp;; then&lt;br /&gt;
        echo &amp;quot;cannot find rtorrent binary in PATH $PATH&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
        exit 3&lt;br /&gt;
    fi&lt;br /&gt;
    if&amp;amp;nbsp;! [ -r &amp;quot;${config}&amp;quot; ]&amp;amp;nbsp;; then &lt;br /&gt;
        echo &amp;quot;cannot find readable config ${config}. check that it is there and permissions are appropriate&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
        exit 3 &lt;br /&gt;
    fi &lt;br /&gt;
    session=`getsession &amp;quot;$config&amp;quot;` &lt;br /&gt;
    if&amp;amp;nbsp;! [ -d &amp;quot;${session}&amp;quot; ]&amp;amp;nbsp;; then&lt;br /&gt;
        echo &amp;quot;cannot find readable session directory ${session} from config ${config}. check permissions&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
        exit 3&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
    echo -n &amp;quot;Starting $DESC: $NAME&amp;quot;&lt;br /&gt;
    [ -d &amp;quot;${base}&amp;quot; ] &amp;amp;amp;&amp;amp;amp; cd &amp;quot;${base}&amp;quot;&lt;br /&gt;
    stty stop undef &amp;amp;amp;&amp;amp;amp; stty start undef&lt;br /&gt;
    su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;screen -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
    # this works for the screen command, but starting rtorrent below adopts screen session gid&lt;br /&gt;
    # even if it is not the screen session we started (e.g. running under an undesirable gid&lt;br /&gt;
    #su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;sg \&amp;quot;$group\&amp;quot; -c \&amp;quot;screen -fn -dm -S ${srnname} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null\&amp;quot;&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
    su -c &amp;quot;screen -S &amp;quot;${srnname}&amp;quot; -X screen rtorrent ${options} 2&amp;amp;gt;&amp;amp;amp;1 1&amp;amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
    echo_success&lt;br /&gt;
    echo&lt;br /&gt;
    RETVAL=0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
    echo -n &amp;quot;Stopping $DESC: $NAME&amp;quot;&lt;br /&gt;
    session=`getsession &amp;quot;$config&amp;quot;`&lt;br /&gt;
    if&amp;amp;nbsp;! [ -s ${session}/rtorrent.lock ]&amp;amp;nbsp;; then&lt;br /&gt;
        return&lt;br /&gt;
    fi&lt;br /&gt;
    pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed &amp;quot;s/[^0-9]//g&amp;quot;`&lt;br /&gt;
    if ps -A | grep -sq ${pid}.*rtorrent&amp;amp;nbsp;; then # make sure the pid doesn't belong to another process&lt;br /&gt;
        kill -s INT ${pid}&lt;br /&gt;
    fi&lt;br /&gt;
    echo_success&lt;br /&gt;
    echo&lt;br /&gt;
    RETVAL=0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
getsession() { &lt;br /&gt;
    session=`cat &amp;quot;$1&amp;quot; | grep &amp;quot;^[[:space:]]*session[[:space:]]*=&amp;quot; | sed &amp;quot;s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//&amp;quot; `&lt;br /&gt;
    echo $session&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkcnfg&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
    start&lt;br /&gt;
   &amp;amp;nbsp;;;&lt;br /&gt;
  stop)&lt;br /&gt;
    stop&lt;br /&gt;
   &amp;amp;nbsp;;;&lt;br /&gt;
  restart|force-reload)&lt;br /&gt;
    echo -n &amp;quot;Restarting $DESC: $NAME&amp;quot;&lt;br /&gt;
    echo &lt;br /&gt;
    stop&lt;br /&gt;
    sleep 1&lt;br /&gt;
    start&lt;br /&gt;
   &amp;amp;nbsp;;;&lt;br /&gt;
  *)&lt;br /&gt;
    echo &amp;quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&amp;quot; &amp;amp;gt;&amp;amp;amp;2&lt;br /&gt;
    exit 1&lt;br /&gt;
   &amp;amp;nbsp;;;&lt;br /&gt;
esac&lt;br /&gt;
exit $RETVAL&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Ну і запускаємо &lt;br /&gt;
&lt;br /&gt;
 chkconfig rtorrent on&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1792</id>
		<title>Служба rtorrent</title>
		<link rel="alternate" type="text/html" href="https://wiki.welard.com/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B1%D0%B0_rtorrent&amp;diff=1792"/>
		<updated>2009-05-21T13:26:55Z</updated>

		<summary type="html">&lt;p&gt;91.124.47.194: Created page with 'Строримо такий файлик з правами на виконання &amp;lt;pre&amp;gt; #!/bin/bash # # chkconfig: - 95 05 # description: rtorrent daemon # process name: fail2ba...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Строримо такий файлик з правами на виконання&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# chkconfig: - 95 05&lt;br /&gt;
# description: rtorrent daemon&lt;br /&gt;
# process name: fail2ban-server&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
# Author: Andrew G &lt;br /&gt;
# Licensed under the GPLv2&lt;br /&gt;
&lt;br /&gt;
#######################&lt;br /&gt;
##Start Configuration##&lt;br /&gt;
#######################&lt;br /&gt;
# You can specify your configuration in a different file &lt;br /&gt;
# (so that it is saved with upgrades, saved in your home directory,&lt;br /&gt;
# or whateve reason you want to)&lt;br /&gt;
# by commenting out/deleting the configuration lines and placing them&lt;br /&gt;
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would&lt;br /&gt;
# have written them here (you can leave the comments if you desire&lt;br /&gt;
# and then uncommenting the following line correcting the path/filename &lt;br /&gt;
# for the one you used. note the space after the &amp;quot;.&amp;quot;.&lt;br /&gt;
# . /etc/rtorrent.init.conf&lt;br /&gt;
&lt;br /&gt;
#Do not put a space on either side of the equal signs e.g.&lt;br /&gt;
# system user to run as&lt;br /&gt;
user=&amp;quot;'''andrew'''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# the system group to run as, not implemented, see start for beginning implementation&lt;br /&gt;
# group=`id -ng &amp;quot;$user&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
# the full path to the filename where you store your rtorrent configuration&lt;br /&gt;
config=&amp;quot;`su -c 'echo $HOME' $user`/.rtorrent.rc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# set of options to run with&lt;br /&gt;
options=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# default directory for screen, needs to be an absolute path&lt;br /&gt;
base=&amp;quot;`su -c 'echo $HOME' $user`&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# name of screen session&lt;br /&gt;
srnname=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# file to log to (makes for easier debugging if something goes wrong)&lt;br /&gt;
logfile=&amp;quot;/var/log/rtorrentInit.log&amp;quot;&lt;br /&gt;
&lt;br /&gt;
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin&lt;br /&gt;
DESC=&amp;quot;rtorrent&amp;quot;&lt;br /&gt;
NAME=rtorrent&lt;br /&gt;
DAEMON=$NAME&lt;br /&gt;
SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
&lt;br /&gt;
. /etc/init.d/functions&lt;br /&gt;
RETVAL=0&lt;br /&gt;
checkcnfg() {&lt;br /&gt;
    exists=0&lt;br /&gt;
    for i in `echo &amp;quot;$PATH&amp;quot; | tr ':' '\n'` ; do&lt;br /&gt;
        if [ -f $i/$NAME ] ; then&lt;br /&gt;
            exists=1&lt;br /&gt;
            break&lt;br /&gt;
        fi&lt;br /&gt;
    done&lt;br /&gt;
    if [ $exists -eq 0 ] ; then&lt;br /&gt;
        echo &amp;quot;cannot find rtorrent binary in PATH $PATH&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
        exit 3&lt;br /&gt;
    fi&lt;br /&gt;
    if ! [ -r &amp;quot;${config}&amp;quot; ] ; then &lt;br /&gt;
        echo &amp;quot;cannot find readable config ${config}. check that it is there and permissions are appropriate&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
        exit 3 &lt;br /&gt;
    fi &lt;br /&gt;
    session=`getsession &amp;quot;$config&amp;quot;` &lt;br /&gt;
    if ! [ -d &amp;quot;${session}&amp;quot; ] ; then&lt;br /&gt;
        echo &amp;quot;cannot find readable session directory ${session} from config ${config}. check permissions&amp;quot; | tee -a &amp;quot;$logfile&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
        exit 3&lt;br /&gt;
    fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
    echo -n &amp;quot;Starting $DESC: $NAME&amp;quot;&lt;br /&gt;
    [ -d &amp;quot;${base}&amp;quot; ] &amp;amp;&amp;amp; cd &amp;quot;${base}&amp;quot;&lt;br /&gt;
    stty stop undef &amp;amp;&amp;amp; stty start undef&lt;br /&gt;
    su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;screen -dm -S ${srnname} 2&amp;gt;&amp;amp;1 1&amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    # this works for the screen command, but starting rtorrent below adopts screen session gid&lt;br /&gt;
    # even if it is not the screen session we started (e.g. running under an undesirable gid&lt;br /&gt;
    #su -c &amp;quot;screen -ls | grep -sq &amp;quot;\.${srnname}[[:space:]]&amp;quot; &amp;quot; ${user} || su -c &amp;quot;sg \&amp;quot;$group\&amp;quot; -c \&amp;quot;screen -fn -dm -S ${srnname} 2&amp;gt;&amp;amp;1 1&amp;gt;/dev/null\&amp;quot;&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    su -c &amp;quot;screen -S &amp;quot;${srnname}&amp;quot; -X screen rtorrent ${options} 2&amp;gt;&amp;amp;1 1&amp;gt;/dev/null&amp;quot; ${user} | tee -a &amp;quot;$logfile&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    echo_success&lt;br /&gt;
    echo&lt;br /&gt;
    RETVAL=0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
    echo -n &amp;quot;Stopping $DESC: $NAME&amp;quot;&lt;br /&gt;
    session=`getsession &amp;quot;$config&amp;quot;`&lt;br /&gt;
    if ! [ -s ${session}/rtorrent.lock ] ; then&lt;br /&gt;
        return&lt;br /&gt;
    fi&lt;br /&gt;
    pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed &amp;quot;s/[^0-9]//g&amp;quot;`&lt;br /&gt;
    if ps -A | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't belong to another process&lt;br /&gt;
        kill -s INT ${pid}&lt;br /&gt;
    fi&lt;br /&gt;
    echo_success&lt;br /&gt;
    echo&lt;br /&gt;
    RETVAL=0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
getsession() { &lt;br /&gt;
    session=`cat &amp;quot;$1&amp;quot; | grep &amp;quot;^[[:space:]]*session[[:space:]]*=&amp;quot; | sed &amp;quot;s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//&amp;quot; `&lt;br /&gt;
    echo $session&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkcnfg&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
    start&lt;br /&gt;
    ;;&lt;br /&gt;
  stop)&lt;br /&gt;
    stop&lt;br /&gt;
    ;;&lt;br /&gt;
  restart|force-reload)&lt;br /&gt;
    echo -n &amp;quot;Restarting $DESC: $NAME&amp;quot;&lt;br /&gt;
    echo &lt;br /&gt;
    stop&lt;br /&gt;
    sleep 1&lt;br /&gt;
    start&lt;br /&gt;
    ;;&lt;br /&gt;
  *)&lt;br /&gt;
    echo &amp;quot;Usage: $SCRIPTNAME {start|stop|restart|force-reload}&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    exit 1&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit $RETVAL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Ну і запускаємо &lt;br /&gt;
 chkconfig rtorrent on&lt;/div&gt;</summary>
		<author><name>91.124.47.194</name></author>
		
	</entry>
</feed>