{"id":796,"date":"2018-10-17T13:29:42","date_gmt":"2018-10-17T13:29:42","guid":{"rendered":"https:\/\/edulab.unitn.it\/tecnici\/?p=796"},"modified":"2018-10-17T13:33:13","modified_gmt":"2018-10-17T13:33:13","slug":"how-to-add-rc-local-in-debian-9","status":"publish","type":"post","link":"https:\/\/edulab.unitn.it\/tecnici\/how-to-add-rc-local-in-debian-9\/","title":{"rendered":"How to add rc.local in Debian 9"},"content":{"rendered":"<p><a href=\"https:\/\/www.itechlounge.net\/2017\/10\/linux-how-to-add-rc-local-in-debian-9\/\">Fonte<\/a><\/p>\n<p>On Debian 9, the traditional \u201crc.local\u201d has been deprecated. For traditional Linux users and administrators, there is a way to get it back using SystemD. See the procedure below :<\/p>\n<p>1. Edit the non-existing file \u201crc-local.service\u201d :<\/p>\n<pre>nano \/etc\/systemd\/system\/rc-local.service<\/pre>\n<p>1.1. Add the following content to \u201c\/etc\/systemd\/system\/rc-local.service\u201d :<\/p>\n<pre>[Unit]\r\nDescription=\/etc\/rc.local\r\nConditionPathExists=\/etc\/rc.local\r\n\r\n[Service]\r\nType=forking\r\nExecStart=\/etc\/rc.local start\r\nTimeoutSec=0\r\nStandardOutput=tty\r\nRemainAfterExit=yes\r\nSysVStartPriority=99\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/pre>\n<p>2. Edit the \u201crc.local\u201d file :<\/p>\n<pre>nano \/etc\/rc.local<\/pre>\n<p>2.1. Append the generic content below and save the file :<\/p>\n<pre>#!\/bin\/sh -e\r\n#\r\n# rc.local\r\n#\r\n# This script is executed at the end of each multiuser runlevel.\r\n# Make sure that the script will \"exit 0\" on success or any other\r\n# value on error.\r\n#\r\n# In order to enable or disable this script just change the execution\r\n# bits.\r\n#\r\n# By default this script does nothing.\r\n\r\nexit 0<\/pre>\n<p>3. Change permissions :<\/p>\n<pre>chmod +x \/etc\/rc.local<\/pre>\n<p>4. Enable the \u201crc-local\u201d script on boot :<\/p>\n<pre>systemctl enable rc-local<\/pre>\n<p>5. Start the \u201crc-local\u201d script :<\/p>\n<pre>systemctl start rc-local.service<\/pre>\n<p>6. Check if any error occurred while starting the service :<\/p>\n<pre>systemctl status rc-local.service<\/pre>\n<p>You may now append anything you\u2019d like to the traditional \u201crc.local\u201d.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fonte On Debian 9, the traditional \u201crc.local\u201d has been deprecated. For traditional Linux users and administrators, there is a way to get it back using SystemD. See the procedure below [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,9],"tags":[],"class_list":["post-796","post","type-post","status-publish","format-standard","hentry","category-how-to","category-linux"],"_links":{"self":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts\/796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/comments?post=796"}],"version-history":[{"count":5,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts\/796\/revisions"}],"predecessor-version":[{"id":801,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/posts\/796\/revisions\/801"}],"wp:attachment":[{"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/media?parent=796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/categories?post=796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edulab.unitn.it\/tecnici\/wp-json\/wp\/v2\/tags?post=796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}