{"id":1329,"date":"2013-10-17T01:29:59","date_gmt":"2013-10-16T23:29:59","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=1329"},"modified":"2013-10-25T16:56:27","modified_gmt":"2013-10-25T14:56:27","slug":"eibknx-upstart-startup-script-for-eibd","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/eibknx-upstart-startup-script-for-eibd\/","title":{"rendered":"EIB\/KNX: Upstart startup script for eibd"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_1329 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_1329')){$('.twoclick_social_bookmarks_post_1329').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"EIB%2FKNX%3A%20Upstart%20startup%20script%20for%20eibd\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Aas%20a%20follow%C2%A0up%20of%20the%202%20previous%20posts%28compiling%20eibd%20and%20SysV%20startup%20script%29%20here%20is%20a%20sample%20Upstart%20script%20for%20the%20eibd%20daemon.%20Some%20Ubuntu%20based%20distributions%20uses%20the%20upstart%20start%20mechanism.%0D%0A%0D%0ALogin%20as%20root%20at%20your%20machine%20where%20eibd%20is%20installed%20and%20add%20a%20user%20under%C2%A0%20which%20the%20eibd%20process%20should%20run.%0D%0A%0D%0Auseradd%20eibd%20-s%20%2Fbin%2Ffalse%20-U%20-M%0D%0A%0D%0ACreate%20the%20upstart%20conf%20file%20%2Fetc%2Finit%20...\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/eibknx-upstart-startup-script-for-eibd\\\/\",\"post_id\":1329,\"post_title_referrer_track\":\"EIB%2FKNX%3A+Upstart+startup+script+for+eibd\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>as a follow\u00a0up of the 2 previous posts(<a title=\"Raspberry PI: Cross compiling the KNX\/EIB eibd\" href=\"http:\/\/michlstechblog.info\/blog\/raspberry-pi-cross-compiling-the-knxeib-eibd\/\">compiling eibd<\/a> and <a title=\"KNX\/EIB: System V Startscript for eibd\" href=\"http:\/\/michlstechblog.info\/blog\/knxeib-sysv-startscript-for-eibd\/\">SysV startup script<\/a>) here is a sample Upstart script for the eibd daemon. Some Ubuntu based distributions uses the upstart start mechanism.<\/p>\n<p>Login as root at your machine where eibd is installed and add a user under\u00a0 which the eibd process should run.<\/p>\n<p><code>useradd eibd -s \/bin\/false -U -M<\/code><\/p>\n<p>Create the upstart conf file \/etc\/init\/eibd.conf<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#######################################################################\r\n# eibd - startscript for the eibd daemon\r\ndescription &quot;eibd daemon Upstart script&quot;\r\nauthor &quot;Michael Albert info@michlstechblog.info&quot;\r\n\r\nstart on (filesystem or resume)\r\nstop on (suspend or runlevel &#x5B;!2345])\r\nexpect fork\r\nnormal exit 0\r\n\r\npre-start script\r\nroute add 224.0.23.12 dev eth0 2&gt;&amp;1 &gt; \/dev\/null || true\r\nend script\r\n\r\nscript\r\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin\r\nDAEMON=\/usr\/local\/bin\/eibd\r\nDAEMON_OPTS=&quot;-d -D -T -R -S -i -u --eibaddr=1.1.128 ipt:192.168.56.1&quot;\r\nexec start-stop-daemon --start -c eibd --exec $DAEMON -- $DAEMON_OPTS\r\nend script\r\n\r\npost-stop script\r\nroute delete 224.0.23.12 2&gt;&amp;1 &gt; \/dev\/null || true\r\nend script\r\n#######################################################################\r\n<\/pre>\n<p><!--more--><\/p>\n<p>Update your configuration<br \/>\n<code>initctl reload-configuration<br \/>\ninitctl status eibd<br \/>\ninitctl start eibd<\/code><\/p>\n<p>This script is rarly tested but should work. Any comments are welcome:-)<\/p>\n<p>Note: When the eibd process do not start or you got the error message: initialisation of the eibd unix protocol failed. Check permissions on \/tmp\/eib. This could occur if the eibd daemon was at least one time started as root. When started as root eibd creates a socket \/tmp\/eib on which only root has the appropirate rights. Login as root and delete the socket. eibd create a new one at startup.<br \/>\n<code>rm \/tmp\/eib<\/code><\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, as a follow\u00a0up of the 2 previous posts(compiling eibd and SysV startup script) here is a sample Upstart script for the eibd daemon. Some Ubuntu based distributions uses the upstart start mechanism. Login as root at your machine where eibd is installed and add a user under\u00a0 which the eibd process should run. useradd &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/eibknx-upstart-startup-script-for-eibd\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">EIB\/KNX: Upstart startup script for eibd<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[329,3,330],"tags":[343,342,331,341,224,863,72,340,338],"class_list":["post-1329","post","type-post","status-publish","format-standard","hentry","category-eibknx","category-linux","category-raspberry-pi","tag-initialisation-of-the-eibd-unix-protocol-failed","tag-eib","tag-eibd","tag-knx","tag-linux-2","tag-raspberry-pi","tag-script","tag-ubuntu","tag-upstart"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=1329"}],"version-history":[{"count":19,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1329\/revisions"}],"predecessor-version":[{"id":1383,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1329\/revisions\/1383"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=1329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=1329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=1329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}