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 C3CE51381F3 for ; Tue, 27 Aug 2013 06:24:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AF965E0CF3; Tue, 27 Aug 2013 06:24:33 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0AD90E0C01 for ; Tue, 27 Aug 2013 06:24:31 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id y6so2161273lbh.20 for ; Mon, 26 Aug 2013 23:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=snR0eJcT1K/3KZhPuZnzhY3BQ/kl9hxWLvRExNov8b0=; b=rcvLtutLbZMJv9qZeKf2Xr4H1fseX4T4YzikOL9WLiRjyB2JYs/Q7vXUenVxS9QGUm efTzWlID8kth8JROmr7WSIhkQi+6aiPdxsOWUHsL7yen+Z8Pu5nRlmnwBgaY2h7jhrlT 2msFeGW5emNHT9SwUg0+gDZAyArdI5YOFxT1kQQ91GHzAXdm5TkdbonhE8WOGS95Sksd 6vuyW/vgftY3rUbWZPN3Zl0r6/GnP7GuIie+lvhzXVe3+0S/C30tC91PsVih78xSS7W6 x2eo5T0oZpOcsGiio92vvoJHyAotb71wNRC4CxXXG5TPwOFKNLWQqYpK5pd2MSKPnZnh CWZg== 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 X-Received: by 10.152.19.97 with SMTP id d1mr178374lae.34.1377584670270; Mon, 26 Aug 2013 23:24:30 -0700 (PDT) Received: by 10.114.96.2 with HTTP; Mon, 26 Aug 2013 23:24:30 -0700 (PDT) In-Reply-To: <8165.1377583831@ccs.covici.com> References: <22350.1377575576@ccs.covici.com> <8165.1377583831@ccs.covici.com> Date: Tue, 27 Aug 2013 01:24:30 -0500 Message-ID: Subject: Re: [gentoo-user] looking for a couple of systemd units From: =?UTF-8?B?Q2FuZWsgUGVsw6FleiBWYWxkw6lz?= To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: b57930ea-0eb2-4aee-804a-2f3fd2b3b8bc X-Archives-Hash: a0d53f0a7469af79ffb41c3db287d577 On Tue, Aug 27, 2013 at 1:10 AM, wrote: > Canek Pel=C3=A1ez Vald=C3=A9s wrote: > >> On Mon, Aug 26, 2013 at 11:06 PM, Canek Pel=C3=A1ez Vald=C3=A9s 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 scr= ipt >> >> by itself. >> >> >> >> Thanks in advance for any suggestions. >> > >> > I use this one in production for mailman with Gentoo: >> > >> > ---------------------------------------------------------------- >> > [Unit] >> > Description=3DMailman mailing list service >> > After=3Dnetwork.target >> > >> > [Service] >> > Type=3Dforking >> > ExecStart=3D/usr/lib/mailman/bin/mailmanctl -s start >> > ExecStop=3D/usr/lib/mailman/bin/mailmanctl stop >> > User=3Dmailman >> > Group=3Dmailman >> > >> > [Install] >> > WantedBy=3Dmulti-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=3DThe Internet News daemon >> Documentation=3Dman:innd(8) >> ConditionPathExists=3D/var/run/news >> >> [Service] >> Type=3Dsimple >> ExecStart=3D/usr/lib/news/bin/rc.news >> ExecStop=3D/usr/lib/news/bin/rc.news stop >> User=3Dnews >> Group=3Dnews >> >> [Install] >> WantedBy=3Dmulti-user.target >> ---------------------------------------------------------------- >> >> If the binary rc.news forks itself (and there is no option to force it >> to run in the foreground), use Type=3Dforking. 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. With systemd in Gentoo, /var/run is bind mounted from /run, and it's a tmpfs dir, so everything there goes away after a reboot. The config files in tmpfiles.d allows the creation (and automatic removal) of directories and files there. I don't know if it's the "correct" way to fix anything; but it works. Regards. --=20 Canek Pel=C3=A1ez Vald=C3=A9s Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n Universidad Nacional Aut=C3=B3noma de M=C3=A9xico