From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9DAB81381F3 for ; Tue, 27 Aug 2013 14:17:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCECFE0EBA; Tue, 27 Aug 2013 14:17:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B8530E0B11 for ; Tue, 27 Aug 2013 14:17:02 +0000 (UTC) Received: from [10.173.154.230] (85-76-31-176-nat.elisa-mobile.fi [85.76.31.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: ssuominen) by smtp.gentoo.org (Postfix) with ESMTPSA id 6068B33EB73 for ; Tue, 27 Aug 2013 14:17:01 +0000 (UTC) Message-ID: <521CB4C0.3080707@gentoo.org> Date: Tue, 27 Aug 2013 17:16:32 +0300 From: Samuli Suominen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130809 Thunderbird/17.0.8 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] looking for a couple of systemd units References: <22350.1377575576@ccs.covici.com> <8165.1377583831@ccs.covici.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Archives-Salt: 5fd1b6cd-153f-4f31-9526-ea2a00ffcb16 X-Archives-Hash: 1c22ea1775693bdec233dc67e7126085 On 27/08/13 09:24, Canek Peláez Valdés wrote: > On Tue, Aug 27, 2013 at 1:10 AM, wrote: >> Canek Peláez Valdés wrote: >> >>> On Mon, Aug 26, 2013 at 11:06 PM, Canek Peláez Valdés wrote: >>>> On Mon, Aug 26, 2013 at 10:52 PM, wrote: >>>>> Hi. I am looking for a couple of systemd units which I have not been >>>>> able to find -- one for mailman and one for innd which is a shell script >>>>> by itself. >>>>> >>>>> Thanks in advance for any suggestions. >>>> >>>> I use this one in production for mailman with Gentoo: >>>> >>>> ---------------------------------------------------------------- >>>> [Unit] >>>> Description=Mailman mailing list service >>>> After=network.target >>>> >>>> [Service] >>>> Type=forking >>>> ExecStart=/usr/lib/mailman/bin/mailmanctl -s start >>>> ExecStop=/usr/lib/mailman/bin/mailmanctl stop >>>> User=mailman >>>> Group=mailman >>>> >>>> [Install] >>>> WantedBy=multi-user.target >>>> ---------------------------------------------------------------- >>>> >>>> I don't have any for innd. >>> >>> If innd is the one from net-nntp/inn, then the following should work: >>> >>> ---------------------------------------------------------------- >>> [Unit] >>> Description=The Internet News daemon >>> Documentation=man:innd(8) >>> ConditionPathExists=/var/run/news >>> >>> [Service] >>> Type=simple >>> ExecStart=/usr/lib/news/bin/rc.news >>> ExecStop=/usr/lib/news/bin/rc.news stop >>> User=news >>> Group=news >>> >>> [Install] >>> WantedBy=multi-user.target >>> ---------------------------------------------------------------- >>> >>> If the binary rc.news forks itself (and there is no option to force it >>> to run in the foreground), use Type=forking. The former is preferred >>> over the latter. Also, to guarantee that the directory /var/run/news >>> always is present, add the following to a new file >>> /etc/tmpfiles.d/innd.conf: >>> >>> ---------------------------------------------------------------- >>> d /var/run/news 0755 news news 10d - >>> ---------------------------------------------------------------- >>> >>> You can replace 10d with - (hypen), so the directory is never cleaned >>> automatically. If you try this unit and it works as expected, please >>> let us know. >>> >> >> OK, thanks again. I have one question which this brings up -- and this >> applies to openrc as well -- I never have let it migrate /var/run to >> /run and /var/lock likewise because I have directories in those which >> are owned by various users, etc. and the packages themselves almost >> never create such -- is putting things in /etc/tmpfiles.d the correct >> way to fix this? > > tmpfiles.d is from systemd: > > http://www.freedesktop.org/software/systemd/man/tmpfiles.d.html > > However, I think OpenRC developers were thinking about supporting it. > I don't know if that actually happened. openrc-0.11.8 already had initial tmpfiles support, but it's very buggy however ~arch has now openrc-0.12, you could say, complete tmpfiles support and it's already being used at production level packages like sys-apps/kmod's kmod-static-nodes init script so the same tmpfiles systemd uses, will work fine on openrc-0.12 too, long as tmpfiles.setup is in the boot runlevel... - Samuli