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 3C8D01381F3 for ; Tue, 27 Aug 2013 06:10:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 663FAE0A03; Tue, 27 Aug 2013 06:10:35 +0000 (UTC) Received: from mail0200.smtp25.com (mail0200.smtp25.com [174.37.170.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3D25BE09CB for ; Tue, 27 Aug 2013 06:10:34 +0000 (UTC) Received: from ccs.covici.com (s-out-001.smtp25.com [67.228.91.90]) by s-out-001.smtp25.com (8.14.2/8.14.2) with ESMTP id r7R6AWPo012749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 27 Aug 2013 02:10:33 -0400 Received: from ccs.covici.com (localhost [127.0.0.1]) by ccs.covici.com (8.14.7/8.14.5) with ESMTP id r7R6AWvV008166 for ; Tue, 27 Aug 2013 02:10:32 -0400 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] looking for a couple of systemd units In-reply-to: References: <22350.1377575576@ccs.covici.com> Comments: In-reply-to =?us-ascii?Q?=3D=3FUTF-8=3FB=3FQ2FuZWsgUGVsw6FleiBWY?= =?us-ascii?Q?Wxkw6lz=3F=3D?= message dated "Mon, 26 Aug 2013 23:18:19 -0500." X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.4.1 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 27 Aug 2013 02:10:31 -0400 Message-ID: <8165.1377583831@ccs.covici.com> From: covici@ccs.covici.com X-SpamH-OriginatingIP: 70.109.53.110 X-SpamH-Filter: s-out-001.smtp25.com-r7R6AWPo012749 X-Archives-Salt: 4e5cab75-df23-4ec3-98d8-30db60cece56 X-Archives-Hash: 4b7d2eb81f44221d8d07a84ae68dac7a 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 scri= pt > >> 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. >=20 > If innd is the one from net-nntp/inn, then the following should work: >=20 > ---------------------------------------------------------------- > [Unit] > Description=3DThe Internet News daemon > Documentation=3Dman:innd(8) > ConditionPathExists=3D/var/run/news >=20 > [Service] > Type=3Dsimple > ExecStart=3D/usr/lib/news/bin/rc.news > ExecStop=3D/usr/lib/news/bin/rc.news stop > User=3Dnews > Group=3Dnews >=20 > [Install] > WantedBy=3Dmulti-user.target > ---------------------------------------------------------------- >=20 > 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: >=20 > ---------------------------------------------------------------- > d /var/run/news 0755 news news 10d - > ---------------------------------------------------------------- >=20 > 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. >=20 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 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