From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-150062-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 95DCA1381F3
	for <garchives@archives.gentoo.org>; Tue, 27 Aug 2013 06:46:22 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A1F31E0D1A;
	Tue, 27 Aug 2013 06:46:14 +0000 (UTC)
Received: from mail0131.smtp25.com (mail0131.smtp25.com [75.126.84.131])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 95889E0CF3
	for <gentoo-user@lists.gentoo.org>; Tue, 27 Aug 2013 06:46:13 +0000 (UTC)
Received: from ccs.covici.com (d-out-001.smtp25.com [67.228.158.174] (may be forged))
	by d-out-001.smtp25.com (8.14.2/8.14.2) with ESMTP id r7R6kBI1014527
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL)
	for <gentoo-user@lists.gentoo.org>; Tue, 27 Aug 2013 02:46:11 -0400
Received: from ccs.covici.com (localhost [127.0.0.1])
	by ccs.covici.com (8.14.7/8.14.5) with ESMTP id r7R6kA1q012887
	for <gentoo-user@lists.gentoo.org>; Tue, 27 Aug 2013 02:46:10 -0400
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] looking for a couple of systemd units
In-reply-to: <CADPrc81E8k7_VABogYHZPdr8AXxCdm+deOBmRx+=Vwg6ykgzdw@mail.gmail.com>
References: <22350.1377575576@ccs.covici.com> <CADPrc81hii6AWmqfuAydLuBv4z=2f6YjNQpHXNWnsti8xsq7_g@mail.gmail.com> <CADPrc80CNYBpHAqyJ4tD-DV9X3kBUCWiXTisuLXLhh9WMT0WSQ@mail.gmail.com> <8165.1377583831@ccs.covici.com> <CADPrc81E8k7_VABogYHZPdr8AXxCdm+deOBmRx+=Vwg6ykgzdw@mail.gmail.com>
Comments: In-reply-to =?us-ascii?Q?=3D=3FUTF-8=3FB=3FQ2FuZWsgUGVsw6FleiBWY?=
 =?us-ascii?Q?Wxkw6lz=3F=3D?= <caneko@gmail.com>
   message dated "Tue, 27 Aug 2013 01:24:30 -0500."
X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.4.1
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Date: Tue, 27 Aug 2013 02:46:10 -0400
Message-ID: <12886.1377585970@ccs.covici.com>
From: covici@ccs.covici.com
X-SpamH-OriginatingIP: 70.109.53.110
X-SpamH-Filter: d-out-001.smtp25.com-r7R6kBI1014527
X-Archives-Salt: 2525ae54-e354-4e32-a030-d28a46e13e1c
X-Archives-Hash: 1481f1969673cf357e1598cbc8652c14

Canek Pel=C3=A1ez Vald=C3=A9s <caneko@gmail.com> wrote:

> On Tue, Aug 27, 2013 at 1:10 AM,  <covici@ccs.covici.com> wrote:
> > Canek Pel=C3=A1ez Vald=C3=A9s <caneko@gmail.com> wrote:
> >
> >> On Mon, Aug 26, 2013 at 11:06 PM, Canek Pel=C3=A1ez Vald=C3=A9s <canek=
o@gmail.com> wrote:
> >> > On Mon, Aug 26, 2013 at 10:52 PM,  <covici@ccs.covici.com> wrote:
> >> >> Hi.  I am looking for a couple of systemd units which I have not be=
en
> >> >> able to find -- one for mailman and one for innd which is a shell s=
cript
> >> >> 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?
>=20
> tmpfiles.d is from systemd:
>=20
> http://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
>=20
> However, I think OpenRC developers were thinking about supporting it.
> I don't know if that actually happened.
>=20
> 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.
>=20
> I don't know if it's the "correct" way to fix anything; but it works.

It looks like openrc is supporting some version of this, but not very
well documented at all except they refer you to some man page as of a
certain date.


--=20
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com