{"id":21,"date":"2013-06-02T05:46:44","date_gmt":"2013-06-02T05:46:44","guid":{"rendered":"https:\/\/ghodechhap.net\/blog\/?p=21"},"modified":"2013-06-02T05:52:00","modified_gmt":"2013-06-02T05:52:00","slug":"generate-systemd-units-for-lxc-containers","status":"publish","type":"post","link":"https:\/\/ghodechhap.net\/blog\/?p=21","title":{"rendered":"Generate systemd units for lxc containers"},"content":{"rendered":"<p>Now that lxc containers are so easy, how about adding systemd unit files that will start\/stop them and autostart them at boot time?<\/p>\n<p><a href=\"https:\/\/ghodechhap.net\/files\/lxc-ctl\">This <\/a>is a simple script to generate systemd unit for for a container. It appends a _container prefix to the name of the container e.g. the container named <em>webproxy<\/em> is managed by service file <em>webproxy_container.service<\/em>.<\/p>\n<p>You can add and remove unit files for any container with this script.<\/p>\n<p>Enjoy.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that lxc containers are so easy, how about adding systemd unit files that will start\/stop them and autostart them at boot time? This is a simple script to generate systemd unit for for a container. It appends a _container prefix to the name of the container e.g. the container named webproxy is managed by [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,1],"tags":[5,4,3],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-technology","category-uncategorized","tag-archlinux","tag-container","tag-lxc"],"_links":{"self":[{"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21"}],"version-history":[{"count":7,"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions\/27"}],"wp:attachment":[{"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ghodechhap.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}