{"id":267721,"date":"2015-11-08T17:29:03","date_gmt":"2015-11-08T14:29:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=267721"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=267721","title":{"rendered":"\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u0443\u0437\u044b\u043a\u0438 \u0434\u043b\u044f \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0440\u0430\u0434\u0438\u043e"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/91d\/b58\/36f\/91db5836ff014fecb472f78fe69b4ae3.jpg\" width=\"250\"\/><br \/>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, %username%!<br \/>  \u041a\u0430\u043a-\u0442\u043e \u043c\u044b \u0441 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 \u0434\u0440\u0443\u0437\u0435\u0439 \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0440\u0430\u0434\u0438\u043e, \u043d\u043e \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 VPS \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 \u043c\u0443\u0437\u044b\u043a\u0438, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043e\u0432 \u2014 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0433\u0440\u0430\u0431\u0435\u0436.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u042f \u0434\u043e\u043b\u0433\u043e \u0438\u0441\u043a\u0430\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e  <a href=\"http:\/\/habrahabr.ru\/users\/ableev\/\" class=\"user_link\">ableev<\/a> <a href=\"http:\/\/habrahabr.ru\/post\/142067\/\">\u00ab\u042f\u043d\u0434\u0435\u043a\u0441.\u0414\u0438\u0441\u043a \u043a\u0430\u043a \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u00bb<\/a>. \u041c\u0435\u043d\u044f \u043f\u043e\u0441\u0435\u0442\u0438\u043b\u0430 \u0438\u0434\u0435\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u0443\u0437\u044b\u043a\u0443 \u043d\u0430 \u042f\u043d\u0434\u0435\u043a\u0441 \u0434\u0438\u0441\u043a\u0435? \u041e\u043f\u0443\u0441\u0442\u0438\u043c \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0445 \u043f\u0440\u0430\u0432 \u2014 \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u043c\u0435\u043d\u044f \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 IceCast \u0443\u0441\u043f\u0435\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043c\u0443\u0437\u044b\u043a\u0443 \u0441 \u042f\u043d\u0434\u0435\u043a\u0441 \u0434\u0438\u0441\u043a\u0430, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0437\u0430\u043f\u0438\u043d\u0430\u043d\u0438\u044f\u043c \u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u043c \u0432 \u0432\u0435\u0449\u0430\u043d\u0438\u0438, \u0430 \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e. \u042d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u0435\u043d\u044f \u0437\u0430\u0446\u0435\u043f\u0438\u043b\u0430, \u0438 \u044f \u043d\u0430\u0448\u0435\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0447\u0442\u043e \u0438\u0433\u0440\u0430\u0435\u0442 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430 \u0440\u0430\u0434\u0438\u043e \u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u043a\u0438, \u0430 \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u043d\u043d\u044b\u0435 \u0442\u0440\u0435\u043a\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443\u0434\u0430\u043b\u044f\u0442\u044c. \u042d\u0442\u043e \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a, \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 VPS \u0441 \u0431\u0435\u0437\u043b\u0438\u043c\u0438\u0442\u043d\u044b\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c \u043f\u043e\u043b\u043d\u043e, \u0430 \u0441 \u0431\u0435\u0437\u043b\u0438\u043c\u0438\u0442\u043d\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u043d\u0430 \u0434\u0438\u0441\u043a\u0430\u0445 \u043d\u0435\u0442.<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0438\u0437 \u044f\u0437\u044b\u043a\u043e\u0432 \u044f \u0445\u0443\u0434\u043e-\u0431\u0435\u0434\u043d\u043e \u0432\u043b\u0430\u0434\u0435\u044e C#, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u0442\u044c \u043a mono, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0430 Python, PHP, bash.<\/p>\n<p>  \u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u0441\u0442\u0443\u0434\u0438\u044e!<\/p>\n<p>  <b>id3.py<\/b> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0440\u0435\u043a, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0435\u0440\u0435\u0442 \u0442\u0435\u0433\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0445 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">id3.py<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python  class Unbuffered(object):    def __init__(self, stream):        self.stream = stream    def write(self, data):        self.stream.write(data)        self.stream.flush()    def __getattr__(self, attr):        return getattr(self.stream, attr)  import eyeD3 import sys import argparse  def createParser (): \tparser = argparse.ArgumentParser() \tparser.add_argument('-f', '--file') \t \treturn parser  if __name__ == '__main__': \tparser = createParser() \tnamespace = parser.parse_args(sys.argv[1:])   tag = eyeD3.Tag() tag.link(namespace.file) sys.stdout = Unbuffered(sys.stdout) s = tag.getArtist()+&quot; - &quot;+tag.getTitle() f = open('tag.txt','w') f.write(s) f.close() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <b>getCurrent.php<\/b> \u043f\u0430\u0440\u0441\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 IceCast \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0442\u0440\u0435\u043a\u0435 \u0438 \u0432\u044b\u0434\u0430\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u0430\u044e\u0449\u0435\u0433\u043e \u0442\u0440\u0435\u043a\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">getCurrent.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php error_reporting(0); header(&quot;Content-Type: text\/html; charset=UTF-8&quot;); $file_name=&quot;http:\/\/localhost:8000\/status.xsl?mount=\/stream&quot;; $r=fopen($file_name,'r'); $text=fread($r,10000); fclose($r); $mas=explode('&lt;tr&gt;', $text); $name = explode(':', $mas[3]); $q = explode ('&lt;\/td&gt;',$name[1]); $q2 = explode ('&lt;td class=&quot;streamdata&quot;&gt;',$q[1]); $rj = $q2[1];  if($rj == &quot;0&quot; or $rj == &quot;&quot;){ echo &quot; Nonstop&quot;;  }else { $fl = file_get_contents('http:\/\/localhost:8000\/status.xsl?mount=\/stream'); function antara($string, $start, $end){ $string = &quot; &quot;.$string; $ini = strpos($string,$start); if ($ini == 0) return &quot;&quot;; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; return substr($string,$ini,$len); } $stream = antara($fl,&quot;&lt;td&gt;Stream Title:&lt;\/td&gt;\\n&lt;td class=\\&quot;streamdata\\&quot;&gt;&quot;,&quot;&lt;\/td&gt;&quot;);  $description = antara($fl, &quot;&lt;td&gt;Stream Description:&lt;\/td&gt;\\n&lt;td class=\\&quot;streamdata\\&quot;&gt;&quot;, &quot;&lt;\/td&gt;&quot;);  $listeners = antara($fl, &quot;&lt;td&gt;Current Listeners:&lt;\/td&gt;\\n&lt;td class=\\&quot;streamdata\\&quot;&gt;&quot;, &quot;&lt;\/td&gt;&quot;);  $max = antara($fl, &quot;&lt;td&gt;Peak Listeners:&lt;\/td&gt;\\n&lt;td class=\\&quot;streamdata\\&quot;&gt;&quot;, &quot;&lt;\/td&gt;&quot;);  $song = antara($fl, &quot;&lt;td&gt;Current Song:&lt;\/td&gt;\\n&lt;td class=\\&quot;streamdata\\&quot;&gt;&quot;, &quot;&lt;\/td&gt;&quot;);  echo $song; ?&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 bash <b>isOnline.sh<\/b> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0434\u0438\u043e \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0438\u0448\u0435\u0442 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">isOnline.sh<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#!\/bin\/bash rm isOnline.txt ps ax | grep -v grep | grep radio.sh &gt; isOnline.txt <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0434\u0438\u043e liquidsoap <b>radio.sh<\/b> \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u043e \u0440\u0430\u0434\u0438\u043e.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">radio.sh<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#!\/usr\/bin\/liquidsoap  # \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 # \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 out = output.icecast( # \u0445\u043e\u0441\u0442 \u0441 icecast host = &quot;127.0.0.1&quot;,  # \u0435\u0433\u043e \u043f\u043e\u0440\u0442 port = 8000,  # \u043b\u043e\u0433\u0438\u043d user = &quot;source&quot;,  # \u0438 \u043f\u0430\u0440\u043e\u043b\u044c password = &quot;password&quot;,  # \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 name = &quot;Radio Name&quot;,  # \u0436\u0430\u043d\u0440 genre = &quot;Various&quot;,  # \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442 url = &quot;http:\/\/www.host.local&quot;  # \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 encoding = &quot;UTF-8&quot; )  # \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c telnet-\u0441\u0435\u0440\u0432\u0435\u0440 #set(&quot;server.telnet.bind_addr&quot;,&quot;127.0.0.1&quot;) #set(&quot;server.telnet&quot;,true)  # _____________________________________ # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0434\u0438\u043e\u0441\u0435\u0440\u0432\u0435\u0440\u0430.  # \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u043a \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430\u043c, \u043d\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0430\u043f\u043e\u043a, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0443\u0434\u043e\u0431\u043d\u0435\u0435.  # \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 #wd = &quot;\/home\/admin\/radio&quot;  # \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435 \u0441 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u0430\u043c\u0438 #pl = &quot;#{wd}\/collection&quot;  # \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0430\u043f\u043a\u0430 #tech = &quot;#{wd}\/technical&quot;  # \u043b\u043e\u0433\u0438 set(&quot;log.file.append&quot;,true) set(&quot;log.file&quot;,true) set(&quot;log.file.path&quot;,&quot;\/var\/data\/liquidsoap.log&quot;) # \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u043b\u043e\u0433\u0430 set(&quot;log.level&quot;, 3) # \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f #set(&quot;buffering.kind&quot;,&quot;disk_manyfiles&quot;) #set(&quot;decoding.buffer_length&quot;,30.) #set(&quot;buffering.path&quot;,&quot;\/tmp\/radio&quot;) # \u043f\u0430\u043f\u043a\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0430\u043c\u0438 #promo_dir = &quot;#{pl}\/promo&quot;  # \u043f\u0430\u043f\u043a\u0430 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 #progr_dir = &quot;#{pl}\/programs&quot;  # \u043f\u0430\u043f\u043a\u0430 \u0441 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u044d\u0444\u0438\u0440\u043e\u043c #ef = &quot;#{pl}\/efir&quot;  # \u043f\u0430\u043f\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u044d\u0444\u0438\u0440\u043e\u0432 #ni = &quot;#{ef}\/night&quot;  # \u043f\u0430\u043f\u043a\u0438 \u0441 \u043c\u0443\u0437\u044b\u043a\u043e\u0439 mus_ni_dir = &quot;loc.playlist.txt&quot;  # \u043f\u0430\u043f\u043a\u0438 \u0441 \u0434\u0436\u0438\u043d\u0433\u043b\u0430\u043c\u0438 jin_ni_dir = &quot;\/mnt\/username.yadisk\/RT\/jingles&quot;  #promo promo_dir = &quot;\/mnt\/username.yadisk\/RT\/promo&quot;  mus_ni = playlist (reload = 86400, &quot;#{mus_ni_dir}&quot;, mode = &quot;normal&quot;) jin_ni = playlist (reload = 86400, &quot;#{jin_ni_dir}&quot;, mode = &quot;normal&quot;) promo    = playlist (reload = 86400,  &quot;#{promo_dir}&quot;) ni = rotate (weights = [1, 10, 1, 5], [jin_ni, mus_ni, promo, mus_ni])  radio = switch (track_sensitive = true, [   #({ (2w16h10m - 2w16h20m) or (3w14h - 3w14h5m) or (4w16h - 4w16h5m)}, spekt), ({ (3w23h - 3w23h5m) or (4w10h - 4w10h5m)}, pozdr), ({ (2w18h - 2w18h5m) or #(3w18h - 3w18h5m)}, xmas_trad), ({ (6w14h - 6w14h10m) or (6w18h - 6w18h10m)}, prog1), ({ (6w0h - 7w18h)}, xmas_mus_prog),   ({ 1w0h - 7w23h59m }, ni) ])  radio = mksafe(radio) radio = crossfade(start_next=2., fade_out=2., fade_in=2., radio)  out(  %mp3(bitrate = 128, id3v2 = true),  description = &quot;Radio Name 128kbps&quot;,  mount = &quot;stream&quot;,  mksafe(radio) )  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f <b>generator.sh<\/b> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0441\u043a\u0435, \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b. \u042d\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u043e\u0432 \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 1 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">generator.sh<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#!\/bin\/sh find &quot;\/mnt\/username.yadisk\/RT\/music&quot; -name '*.mp3' -print &gt; &quot;disk.playlist.txt&quot; shuf -n 500 &quot;disk.playlist.txt&quot; -o &quot;disk.playlist.txt&quot; sed 's\/\\\/mnt\\\/username.yadisk\\\/RT\\\/music\/\\\/home\\\/admin\\\/rt\\\/tmp\/g' disk.playlist.txt &gt; loc.playlist.txt <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u043d\u0435 \u0443\u043f\u0430\u043b \u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0434\u0438\u043e, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u044f, \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u043e\u043c, \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0442\u0440\u0435\u043a\u0438.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">radio_control.cs<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using System.IO; using System.Collections; using System.Diagnostics;   namespace radio_control {     class song     {         string filename;         string tagname;         string prepared;          System.Diagnostics.Process getTag;           public song()         {             getTag = new System.Diagnostics.Process();             getTag.EnableRaisingEvents = false;             getTag.StartInfo.FileName = &quot;.\/id3.py&quot;;          }          public string FileName         {             get { return filename; }             set { filename = value; }         }         public string Tag         {             get { return tagname; }             set { tagname = value; }         }         public string Prepared         {             get { return prepared; }             set { prepared = value; }         }          \/\/\/ &lt;summary&gt;         \/\/\/ \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0432 \u043f\u043e\u043b\u0435 Prepared         \/\/\/ &lt;\/summary&gt;         \/\/\/ &lt;param name=&quot;tmpDir&quot;&gt;&lt;\/param&gt;         public void Prepare(string tmpDir)         {             File.Copy(FileName, tmpDir+Path.GetFileName(FileName), true);             Prepared = tmpDir + Path.GetFileName(FileName);             Tag = _getTag().Replace(Environment.NewLine,&quot;&quot;);         }          \/\/\u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0444\u0430\u0439\u043b \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438         public void Destroy()         {             File.Delete(Prepared);         }          \/\/\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u044d\u0433\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430         string _getTag()         {             getTag.StartInfo.Arguments = &quot;-f &quot; + this.Prepared;             getTag.Start();             getTag.WaitForExit();             StreamReader str = new StreamReader(&quot;tag.txt&quot;);             string tag = str.ReadToEnd();             str.Close();             return tag;         }      }      class Program     {           static void Main(string[] args)         {             \/\/\u0441\u0447\u0435\u0442\u0447\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c             int count = 0;              string pl_file = &quot;\/home\/admin\/rt\/disk.playlist.txt&quot;; \/\/\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430             string tmpDir = &quot;\/home\/admin\/rt\/tmp\/&quot;; \/\/\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432             string newplTime = &quot;23:30&quot;;             \/\/\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0435\u0441\u0435\u043d             List&lt;song&gt; songs = new List&lt;song&gt;();                          \/\/\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0438\u0433\u0440\u0430\u044e\u0449\u0435\u0433\u043e \u0442\u0440\u0435\u043a\u0430 \u0441 icecast             System.Diagnostics.Process getCurrent = new System.Diagnostics.Process();             getCurrent.EnableRaisingEvents = false;             getCurrent.StartInfo.RedirectStandardOutput = true;             getCurrent.StartInfo.FileName = &quot;\/usr\/bin\/php&quot;;             getCurrent.StartInfo.UseShellExecute = false;             getCurrent.StartInfo.Arguments = &quot;getCurrent.php&quot;;              \/\/\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0434\u0438\u043e             System.Diagnostics.Process isRadio = new System.Diagnostics.Process();             isRadio.EnableRaisingEvents = false;             getCurrent.StartInfo.UseShellExecute = false;             getCurrent.StartInfo.RedirectStandardOutput = true;             isRadio.StartInfo.FileName = &quot;isOnline.sh&quot;;              \/\/\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0430\u0434\u0438\u043e             System.Diagnostics.Process radio = new System.Diagnostics.Process();             radio.EnableRaisingEvents = false;             getCurrent.StartInfo.UseShellExecute = false;             getCurrent.StartInfo.RedirectStandardOutput = true;             radio.StartInfo.FileName = &quot;screen&quot;;             radio.StartInfo.Arguments = &quot;-dmS radio liquidsoap --verbose radiotera.sh&quot;;              \/\/\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u0431\u0438\u0442\u0438\u044f \u0441\u043a\u0440\u0438\u043d\u0430 radio              System.Diagnostics.Process killRadio = new System.Diagnostics.Process();             killRadio.EnableRaisingEvents = false;             getCurrent.StartInfo.UseShellExecute = false;             getCurrent.StartInfo.RedirectStandardOutput = true;             killRadio.StartInfo.FileName = &quot;screen&quot;;             killRadio.StartInfo.Arguments = &quot;-X -S radio quit&quot;;              \/\/\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430             Process genPl = new Process();             genPl.EnableRaisingEvents = false;             genPl.StartInfo.UseShellExecute = false;             genPl.StartInfo.FileName = &quot;generator.sh&quot;;              \/\/\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438\u0437 \u0442\u0440\u0435\u043a\u043e\u0432, \u043e\u0447\u0435\u0440\u0435\u0434\u044c - \u044d\u0442\u043e \u0441\u0442\u0435\u043a \u0442\u0438\u043f\u0430 first in - first out             Queue queue = new Queue(3);                  \/\/\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432                 string[] playlist = (System.IO.File.ReadAllLines(pl_file));                 log(&quot;Loading playlist&quot;);                 \/\/\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c ID3 \u0442\u0435\u0433\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442                 song sng;                 foreach (string value in playlist)                 {                     sng = new song();                     sng.FileName = value;                     songs.Add(sng);                 }                 log(&quot;Playlist loaded.&quot;, ConsoleColor.Green);                 \/\/\u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 3 \u0442\u0440\u0435\u043a\u0430 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a                 songs[0].Prepare(tmpDir);                 count++;                 songs[1].Prepare(tmpDir);                 count++;                 songs[2].Prepare(tmpDir);                 count++;                                   \/\/\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0445 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c                 queue.Enqueue(songs[0]);                 queue.Enqueue(songs[1]);                 queue.Enqueue(songs[2]);                 log(&quot;First 3 tracks prepared:\\n&quot;+songs[0].Tag+&quot;\\n&quot;+songs[1].Tag+&quot;\\n&quot;+songs[2].Tag, ConsoleColor.Green);                    \/\/\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0438\u043a\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b                 song tmp = new song();                 StreamReader rdr;             string online = &quot;&quot;;                              while (true)                 {                     log(&quot;Check time to change playlist&quot;); \/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430                     if (DateTime.Now.ToString(&quot;HH:mm&quot;) == newplTime)                     {                         log(&quot;Its time to change playlist!&quot;, ConsoleColor.Red);                         genPl.Start();  \/\/\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442                         genPl.WaitForExit();                         log(&quot;Playlist generated&quot;, ConsoleColor.Green);                         log(&quot;Loading playlist&quot;);                         playlist = (System.IO.File.ReadAllLines(pl_file));                         songs.Clear();                         foreach (string value in playlist) \/\/\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442                         {                             sng = new song();                             sng.FileName = value;                             songs.Add(sng);                         }                         log(&quot;Playlist loaded&quot;, ConsoleColor.Green);                      }                      log(&quot;Check the availability of radio&quot;);                      isRadio.Start();                     isRadio.WaitForExit();                     rdr = new StreamReader(&quot;isOnline.txt&quot;);                     online=rdr.ReadToEnd();                     rdr.Close();                     \/\/\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043b\u0438 \u0440\u0430\u0434\u0438\u043e?                     if (online == &quot;&quot;)                     {                         log(&quot;Radio is offline!\\nClearing screen&quot;, ConsoleColor.Red);                         killRadio.Start();                         killRadio.WaitForExit();                         log(&quot;Starting the radio&quot;);                         radio.Start();                         log(&quot;Waiting for 10 seconds&quot;);                         System.Threading.Thread.Sleep(10000);                     }                     log(&quot;Get current song&quot;); \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0442\u0440\u0435\u043a                     getCurrent.Start();                     getCurrent.WaitForExit();                     string curr = getCurrent.StandardOutput.ReadToEnd();                     if (curr == &quot;&quot;) continue;                     \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u0440\u0435\u043a \u043e\u0447\u0435\u0440\u0435\u0434\u0438                     tmp = new song();                     tmp = (song)queue.Peek();                      \/\/\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u044d\u0442\u043e\u0442 \u043b\u0438 \u0442\u0440\u0435\u043a \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u0433\u0440\u0430\u0435\u0442                     log(&quot;Now playing: &quot; + curr, ConsoleColor.Cyan);                     log(&quot;Checking queue tag: &quot;+tmp.Tag, ConsoleColor.Cyan);                     if (tmp.Tag != curr)                     {                         \/\/\u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u0430\u0435\u0442 \u043d\u0435 \u043e\u043d, \u043d\u043e \u0438\u0433\u0440\u0430\u0435\u0442 \u0434\u0436\u0438\u043d\u0433\u043b \u2014 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c.                         \/\/\u0417\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u0438\u043c \u0434\u0436\u0438\u043d\u0433\u043b\u0430\u043c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0442\u044d\u0433\u0438 \u0438 \u0432\u043f\u0438\u0448\u0438\u0442\u0435 \u0438\u0445 \u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0437\u0434\u0435\u0441\u044c                         if ((curr == &quot;Radio TERA - Radio TERA&quot;) || (curr==&quot;Unknown&quot;) || (curr==&quot;NonstopS&quot;))                          {                             log(&quot;Now playing radio jingle, move on to the next iteration&quot;);                             continue;                         }                         log(&quot;The current track is different from the queue!!!\\nMove the queue&quot;, ConsoleColor.Red);                         \/\/\u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0442\u0430\u043a\u0438 \u0442\u0440\u0435\u043a \u0443\u0436\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f, \u0442\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0440\u0435\u043a \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438                         queue.Dequeue();                         log(&quot;Dequene track with tag &quot;+tmp.Tag);                          \/\/\u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u0440\u0435\u043a \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438                         log(&quot;Remove the track ended&quot;);                         tmp.Destroy();                          \/\/\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u0440\u0435\u043a \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443                         log(&quot;Prepare next track&quot;);                         songs[count].Prepare(tmpDir);                         \/\/\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c                         log(&quot;Adding it to queue &quot;+songs[count].Tag);                         queue.Enqueue(songs[count]);                                                                           \/\/\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a                         count++;                         log(&quot;Count now: &quot; + count.ToString());                         \/\/\u0435\u0441\u043b\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0441\u0435\u043d, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f \u0438 \u043f\u043e\u0440\u0430 \u0438\u0433\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430                         if (count &gt; songs.Count - 1)                         {                             count = 0;                         }                     }                      \/\/\u0432\u0438\u0441\u0438\u043c 30 \u0441\u0435\u043a\u0443\u043d\u0434                     System.Threading.Thread.Sleep(30000);                 }          }         static void log(string str)         {             Console.WriteLine(str);         }         static void log(string str, ConsoleColor frcolor)         {             Console.ForegroundColor = frcolor;             Console.WriteLine(str);             Console.ForegroundColor=ConsoleColor.White;         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042f \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0432\u043e\u0439 \u0431\u044b\u0434\u043b\u043e \u043a\u043e\u0434, \u0432\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043d\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447 \u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u043b\u0430\u0434\u0435\u043b.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:  <\/p>\n<ul>\n<li>mono<\/li>\n<li>liquidsoap<\/li>\n<li>screen<\/li>\n<li>IceCast<\/li>\n<li>davfs2<\/li>\n<li>php<\/li>\n<li>eyeD3 \u0434\u043b\u044f Python<\/li>\n<\/ul>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0435\u0440\u0435\u0437 radio_control.cs. \u0412\u0441\u0435. \u0414\u0430\u043b\u044c\u0448\u0435 \u043e\u043d \u0441\u0430\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0440\u0430\u0434\u0438\u043e, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442, \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442 \u043c\u0443\u0437\u044b\u043a\u0443 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>  \u0420\u0430\u0434\u0438\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043c\u044b \u0437\u0430\u043a\u0440\u044b\u043b\u0438, \u043d\u043e \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0438 \u0442\u0440\u0443\u0434\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0430\u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0441\u043d\u043e, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043c\u043e\u0433.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/270415\/\"> http:\/\/habrahabr.ru\/post\/270415\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/91d\/b58\/36f\/91db5836ff014fecb472f78fe69b4ae3.jpg\" width=\"250\"\/><br \/>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, %username%!<br \/>  \u041a\u0430\u043a-\u0442\u043e \u043c\u044b \u0441 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 \u0434\u0440\u0443\u0437\u0435\u0439 \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0440\u0430\u0434\u0438\u043e, \u043d\u043e \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 VPS \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 \u043c\u0443\u0437\u044b\u043a\u0438, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043e\u0432 \u2014 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0433\u0440\u0430\u0431\u0435\u0436.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-267721","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=267721"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267721\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}