{"id":177,"date":"2017-02-20T12:44:05","date_gmt":"2017-02-20T10:44:05","guid":{"rendered":"http:\/\/www.hojgaard.org\/?p=177"},"modified":"2017-02-20T12:44:05","modified_gmt":"2017-02-20T10:44:05","slug":"reboot-openwrt","status":"publish","type":"post","link":"https:\/\/hojgaard.org\/?p=177","title":{"rendered":"Reboot OpenWRT"},"content":{"rendered":"<p>from: http:\/\/www.geekslove.it\/2014\/04\/rebooting-openwrt-automatically-when.html<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;width:570px;\"><div class=\"bash codecolorer\"><span class=\"co0\">#! \/bin\/sh<\/span><br \/>\n<span class=\"co0\"># Checks if the wifi conn is up. \u00a0If not, it tries to restart<\/span><br \/>\n<span class=\"co0\"># the wifi. \u00a0If that fails, then reboot.<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"kw2\">ping<\/span> <span class=\"re5\">-c<\/span> <span class=\"nu0\">1<\/span> 10.200.10.1 <span class=\"sy0\">&amp;<\/span>gt; <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null<br \/>\n<span class=\"kw1\">then<\/span><br \/>\n<span class=\"kw3\">echo<\/span> nothing <span class=\"sy0\">&amp;<\/span>gt; <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null<br \/>\n<span class=\"kw1\">else<\/span><br \/>\n<span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>init.d<span class=\"sy0\">\/<\/span>network restart<br \/>\n<span class=\"kw2\">sleep<\/span> <span class=\"nu0\">30<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"kw2\">ping<\/span> <span class=\"re5\">-c<\/span> 10.200.10.1 <span class=\"sy0\">&amp;<\/span>gt; <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null<br \/>\n<span class=\"kw1\">then<\/span><br \/>\n<span class=\"kw3\">echo<\/span> nothing <span class=\"sy0\">&amp;<\/span>gt; <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null<br \/>\n<span class=\"kw1\">else<\/span><br \/>\n<span class=\"kw2\">date<\/span> <span class=\"sy0\">&amp;<\/span>gt;<span class=\"sy0\">&amp;<\/span>gt; <span class=\"sy0\">\/<\/span>root<span class=\"sy0\">\/<\/span>reboot.log<br \/>\nreboot<br \/>\n<span class=\"kw1\">fi<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>from: http:\/\/www.geekslove.it\/2014\/04\/rebooting-openwrt-automatically-when.html #! \/bin\/sh # Checks if the wifi conn is up. \u00a0If not, it tries to restart # the wifi. \u00a0If that fails, then reboot. if ping -c 1 10.200.10.1 &amp;gt; \/dev\/null then echo nothing &amp;gt; \/dev\/null else \/etc\/init.d\/network restart sleep 30 if ping -c 10.200.10.1 &amp;gt; \/dev\/null then echo nothing &amp;gt; \/dev\/null else [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/hojgaard.org\/index.php?rest_route=\/wp\/v2\/posts\/177"}],"collection":[{"href":"https:\/\/hojgaard.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hojgaard.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hojgaard.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hojgaard.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177"}],"version-history":[{"count":3,"href":"https:\/\/hojgaard.org\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/hojgaard.org\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions\/180"}],"wp:attachment":[{"href":"https:\/\/hojgaard.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hojgaard.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hojgaard.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}