{"id":1847,"date":"2016-06-29T16:39:08","date_gmt":"2016-06-30T00:39:08","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=1847"},"modified":"2016-06-29T16:39:08","modified_gmt":"2016-06-30T00:39:08","slug":"linux-start-neorouter-at-boot","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2016\/06\/29\/linux-start-neorouter-at-boot\/","title":{"rendered":"Linux start neorouter at boot using init.d"},"content":{"rendered":"<p>To run neorouter at boot time do the following. To restart neorouter after hibernate or sleep <a href=\"http:\/\/systemsolver.com\/StatlerBlog\/index.php\/2016\/06\/29\/linux-restart-neorouter-keyboard-lights-and-syncthing-after-sleep-or-hibernate\/\">see this post<\/a>:<\/p>\n<p>Open as administrator the folder:<\/p>\n<p style=\"padding-left: 30px;\"><code>\/etc\/init.d<\/code><\/p>\n<p>create a file called:<\/p>\n<p style=\"padding-left: 30px;\"><code>nrservice.sh<\/code><\/p>\n<p>Make the file executable<\/p>\n<p>In the file put the following:<\/p>\n<p style=\"padding-left: 30px;\"><code>#!\/bin\/bash<br \/>\n### BEGIN INIT INFO<br \/>\n# Provides:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nrservice<br \/>\n# Required-Start:\u00a0\u00a0\u00a0 $all<br \/>\n# Should-Start:<br \/>\n# Required-Stop:<br \/>\n# Should-Stop:<br \/>\n# Default-Start:\u00a0\u00a0\u00a0\u00a0 2 3 4 5<br \/>\n# Default-Stop:\u00a0\u00a0\u00a0\u00a0\u00a0 0 1 6<br \/>\n# Short-Description: Start and Stop NeoRouter client service<br \/>\n# Description:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NeoRouter client service connects this computer into NeoRouter virtual network<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 contact support@neorouter.com<br \/>\n### END INIT INFO<\/code><\/p>\n<p style=\"padding-left: 30px;\">set -e<\/p>\n<p style=\"padding-left: 30px;\">NAME=nrservice<br \/>\nDAEMON=\/usr\/bin\/$NAME<\/p>\n<p style=\"padding-left: 30px;\">test -x $DAEMON || exit 0<br \/>\n. \/lib\/lsb\/init-functions<\/p>\n<p style=\"padding-left: 30px;\">case &#8220;$1&#8221; in<br \/>\nstart)<br \/>\nlog_begin_msg &#8220;Starting NeoRouter client service: $NAME&#8221;<br \/>\nstart-stop-daemon &#8211;start &#8211;background -m &#8211;pidfile \/var\/run\/nrservice.pid &#8211;exec $DAEMON &gt;\/dev\/null &amp;&amp; log_end_msg 0 || log_end_msg 1<br \/>\n;;<br \/>\nstop)<br \/>\nlog_begin_msg &#8220;Stopping NeoRouter client service: $NAME&#8221;<br \/>\nstart-stop-daemon &#8211;stop &#8211;pidfile \/var\/run\/nrservice.pid &#8211;oknodo &#8211;exec $DAEMON &amp;&amp; log_end_msg 0 || log_end_msg 1<br \/>\nrm -f \/var\/run\/nrservice.pid<br \/>\n;;<br \/>\nrestart)<br \/>\n$0 stop<br \/>\n$0 start<br \/>\n;;<br \/>\n*)<br \/>\nlog_success_msg &#8220;Usage: \/etc\/init.d\/$0 {start|stop|restart}&#8221;<br \/>\nexit 1<br \/>\n;;<br \/>\nesac<\/p>\n<p style=\"padding-left: 30px;\">exit 0<\/p>\n<p>Reboot<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To run neorouter at boot time do the following. To restart neorouter after hibernate or sleep see this post: Open as administrator the folder: \/etc\/init.d create a file called: nrservice.sh Make the file executable In the file put the following: #!\/bin\/bash ### BEGIN INIT INFO # Provides:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nrservice # Required-Start:\u00a0\u00a0\u00a0 $all # Should-Start: # Required-Stop: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1847","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/comments?post=1847"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1847\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=1847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=1847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=1847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}