{"id":86,"date":"2018-12-22T08:58:57","date_gmt":"2018-12-22T06:58:57","guid":{"rendered":"https:\/\/amsd.go.ro\/wordpress\/?p=86"},"modified":"2021-09-07T11:24:45","modified_gmt":"2021-09-07T08:24:45","slug":"application-autostart-on-synology-nas-boot","status":"publish","type":"post","link":"https:\/\/amsd.go.ro\/wordpress\/?p=86","title":{"rendered":"Application autostart on Synology NAS boot"},"content":{"rendered":"<p>To get an application to automatically start when you boot your Synology NAS:<\/p>\n<p>&nbsp;<\/p>\n<p>SSH into your synology &amp; login as admin or root<\/p>\n<pre>$ cd \/volume1\/application<\/pre>\n<p>&nbsp;<\/p>\n<p>Create &ldquo;application.conf&rdquo; file using the following code<\/p>\n<pre># only start this service after the httpd user process has started<\/pre>\n<pre>start on started httpd-user<\/pre>\n<pre># stop the service gracefully if the runlevel changes to 'reboot'<\/pre>\n<pre>stop on runlevel [06]<\/pre>\n<pre># run the scripts as the 'http' user. Running as root (the default) is a bad ide<\/pre>\n<pre>#setuid admin<\/pre>\n<pre># exec the process. Use fully formed path names so that there is no reliance on<\/pre>\n<pre># the 'www' file is a node.js script which starts the foobar application.<\/pre>\n<pre>exec \/bin\/sh \/volume1\/application\/daemon start<\/pre>\n<p>&nbsp;<\/p>\n<p>Register the autostart<\/p>\n<pre>$ ln -s application.conf \/etc\/init\/application.conf<\/pre>\n<p>&nbsp;<\/p>\n<p>Make the relevant files executable:<\/p>\n<pre>$ chmod -r 777 \/etc\/init\/application.conf <\/pre>\n<p>&nbsp;<\/p>\n<p>That&rsquo;s it &#8211; reboot your NAS and the respective Application should automatically start.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get an application to automatically start when you boot your Synology NAS: &nbsp; SSH into your synology &amp; login as admin or root $ cd \/volume1\/application &nbsp; Create &ldquo;application.conf&rdquo; file using the following code # only start this service [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/amsd.go.ro\/wordpress\/?p=86#more-86\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Application autostart on Synology NAS boot<\/span><\/a><\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8,10,11,12],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-technology","tag-ps_20","tag-ps_32","tag-ps_57","tag-ps_17"],"_links":{"self":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=86"}],"version-history":[{"count":1,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":158,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/86\/revisions\/158"}],"wp:attachment":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}