{"id":918,"date":"2018-05-16T20:26:20","date_gmt":"2018-05-16T17:26:20","guid":{"rendered":"https:\/\/helia.ee\/koolitus\/?page_id=918"},"modified":"2018-05-16T20:26:20","modified_gmt":"2018-05-16T17:26:20","slug":"miktoriku-wol-script","status":"publish","type":"page","link":"https:\/\/helia.ee\/koolitus\/?page_id=918","title":{"rendered":"Miktoriku WOL script"},"content":{"rendered":"<p>Miktoriku WOL script.<\/p>\n<ol>\n<li>vaja muuta fail, praegusel juhul on selleks mac.txt (mac.txt failis on vaja kirja panna arvuti mac`id ja viimane rida peab j\u00e4\u00e4ma t\u00fchjaks).<\/li>\n<li>vaja muuta ka interface, praegusel juhul on see\u00a0ether1-master (see muuda selliseks mis on sinu mikrotiku interface).<\/li>\n<\/ol>\n<p>:global content [\/file get [\/file find name=mac.txt] contents] ;<br \/>\n:global contentLen [ :len $content ] ;<\/p>\n<p>:global lineEnd 0;<br \/>\n:global line &#8220;&#8221;;<br \/>\n:global lastEnd 0;<\/p>\n<p>:do {<br \/>\n:set lineEnd [:find $content &#8220;\\r\\n&#8221; $lastEnd ] ;<br \/>\n:set line [:pick $content $lastEnd $lineEnd] ;<br \/>\n:set lastEnd ( $lineEnd + 2 ) ;<\/p>\n<p>:local tmpArray [:toarray $line] ;<br \/>\n:if ( [:pick $tmpArray 0] != &#8220;&#8221; ) do={<br \/>\n:put $tmpArray;<br \/>\n\/tool wol interface=ether1-master mac=[:pick $tmpArray 0];<br \/>\n#:delay 2<br \/>\n}<br \/>\n} while ($lineEnd &lt; $contentLen)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Miktoriku WOL script. vaja muuta fail, praegusel juhul on selleks mac.txt (mac.txt failis on vaja kirja panna arvuti mac`id ja viimane rida peab j\u00e4\u00e4ma t\u00fchjaks). vaja muuta ka interface, praegusel juhul on see\u00a0ether1-master (see muuda selliseks mis on sinu mikrotiku interface). :global content [\/file get [\/file find name=mac.txt] contents] ; :global contentLen [ :len $content [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":612,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-918","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=918"}],"version-history":[{"count":1,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/918\/revisions"}],"predecessor-version":[{"id":919,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/918\/revisions\/919"}],"up":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/612"}],"wp:attachment":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}