{"id":37,"date":"2010-11-05T11:39:56","date_gmt":"2010-11-05T09:39:56","guid":{"rendered":"https:\/\/www.melen.org\/u\/jan\/wp\/?p=37"},"modified":"2011-01-08T13:08:07","modified_gmt":"2011-01-08T11:08:07","slug":"37","status":"publish","type":"post","link":"https:\/\/www.melen.org\/u\/jan\/wp\/?p=37","title":{"rendered":"Wake up on LAN"},"content":{"rendered":"<p>Simple script for sending wake-up on LAN packets (using wol from ports) first three in a row and then every 60 seconds. The port number should be whatever the device is listening (9 is the port that Buffalo Linkstation is listening).<\/p>\n<pre>\r\n#!\/bin\/sh\r\n#\r\n# Author: Jan Melen-jan(at)melen.org\r\n#\r\nR=1; \r\nQUITFILE=\"\/tmp\/quit_wol.$$\"\r\nWOL=\"\/usr\/local\/bin\/wol\"\r\nWOLADDR=\"192.168.24.2 00:24:a5:00:a6:04\"\r\nWOLPORT=\"9\"\r\necho \"To quit press CTRL-C or touch ${QUITFILE}\"\r\n\r\n$WOL -p ${WOLPORT} -i ${WOLADDR} &gt; \/dev\/null; sleep 1\r\n$WOL -p ${WOLPORT} -i ${WOLADDR} &gt; \/dev\/null; sleep 1\r\nwhile [ $R -eq 1 ]; do\r\n    $WOL -p ${WOLPORT} -i ${WOLADDR} &gt; \/dev\/null\r\n    if [ -f ${QUITFILE} ]; then\r\n        rm ${QUITFILE}\r\n        exit 0\r\n    fi\r\n    sleep 60\r\ndone\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Simple script for sending wake-up on LAN packets (using wol from ports) first three in a row and then every 60 seconds. The port number should be whatever the device is listening (9 is the port that Buffalo Linkstation is listening). #!\/bin\/sh # # Author: Jan Melen-jan(at)melen.org # R=1; QUITFILE=&#8221;\/tmp\/quit_wol.$$&#8221; WOL=&#8221;\/usr\/local\/bin\/wol&#8221; WOLADDR=&#8221;192.168.24.2 00:24:a5:00:a6:04&#8243; WOLPORT=&#8221;9&#8243; echo [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/37"}],"collection":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=37"}],"version-history":[{"count":9,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":64,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions\/64"}],"wp:attachment":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}