{"id":1843,"date":"2016-06-29T16:31:56","date_gmt":"2016-06-30T00:31:56","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=1843"},"modified":"2016-06-29T16:31:56","modified_gmt":"2016-06-30T00:31:56","slug":"linux-restart-neorouter-keyboard-lights-and-syncthing-after-sleep-or-hibernate","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2016\/06\/29\/linux-restart-neorouter-keyboard-lights-and-syncthing-after-sleep-or-hibernate\/","title":{"rendered":"Linux restart neorouter and syncthing after sleep or hibernate"},"content":{"rendered":"<p>To restart a service or program after thawing or resuming from hibernation\/sleep do the following. To make neorouter start at boot <a href=\"http:\/\/systemsolver.com\/StatlerBlog\/index.php\/2016\/06\/29\/linux-start-neorouter-at-boot\/\">see this post<\/a>.<\/p>\n<p>Open the following folder as administrator.<\/p>\n<p style=\"padding-left: 30px;\"><code>\/etc\/pm\/sleep.d<\/code><\/p>\n<p>with a title that makes sense to you with the &#8216;sh&#8217; extension. Use double zeros in the document name to run the service\/program after all the other stuff has run.<\/p>\n<p>Example:<\/p>\n<p style=\"padding-left: 30px;\"><code>00_neorouter_onresume.sh<\/code><\/p>\n<p>In the document<\/p>\n<p style=\"padding-left: 30px;\">#! \/bin\/bash<\/p>\n<p style=\"padding-left: 30px;\">case &#8220;$1&#8221; in<br \/>\nthaw)<br \/>\nsu &#8211; tech -c &#8220;\/etc\/init.d\/nrservice.sh restart&#8221;<br \/>\n;;<br \/>\nresume)<br \/>\nsu &#8211; tech -c &#8220;\/etc\/init.d\/nrservice.sh restart&#8221;<br \/>\n;;<\/p>\n<p style=\"padding-left: 30px;\">esac<\/p>\n<p>The &#8216;su &#8211; tech -c &#8216; sets the program to be run as su. I&#8217;m not sure why no password, other than all these files are owned by root and have root as the group.<\/p>\n<p>Now make sure the file is owned by root rw and has root as the primary group.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To restart a service or program after thawing or resuming from hibernation\/sleep do the following. To make neorouter start at boot see this post. Open the following folder as administrator. \/etc\/pm\/sleep.d with a title that makes sense to you with the &#8216;sh&#8217; extension. Use double zeros in the document name to run the service\/program after [&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-1843","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\/1843","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=1843"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1843\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=1843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=1843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=1843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}