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 151B21381F3 for ; Tue, 27 Aug 2013 04:18:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C3A7AE0C15; Tue, 27 Aug 2013 04:18:22 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 88B32E0C04 for ; Tue, 27 Aug 2013 04:18:21 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id v1so2181172lbd.3 for ; Mon, 26 Aug 2013 21:18:19 -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=+WGOCITvUgpngligp4pB4EeAtmcCGnqlYKOd8Cw+juA=; b=shUl3IJSv41TfC4WGaCmumMzUdymVMs+zVd8VnHcJctWLVL8Hb+jRBNHQSZ8UmZQU5 ypgtvjJCM56c2GHA0vdlj2KcT+vRCiy3DgIl9gfEXHX6WpFNcKJUWoL+gFJSCs0jkvd7 CchcIWjYmA5Mn7RRj4SNIaJbHtSFBMOzoi3mXJVz+xUARodQjVB8WgUhXhYlqfR6KIix Ijv2MlVPqhZ5oGsrE36bDIGqPCjWLm5n7w+JjwQlYOtwNGXTn5Fz6+2kho1yKW2Cnpr0 8dJstXRydEGb2OrI5bkGUqbazBAdclgyZXl+Rpn5HaCo61cF1fSceGqFSoidR85VF3sS 3CtQ== 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.29.201 with SMTP id m9mr17013167lah.6.1377577099810; Mon, 26 Aug 2013 21:18:19 -0700 (PDT) Received: by 10.114.96.2 with HTTP; Mon, 26 Aug 2013 21:18:19 -0700 (PDT) In-Reply-To: References: <22350.1377575576@ccs.covici.com> Date: Mon, 26 Aug 2013 23:18:19 -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: 4e1fbeb9-e8fd-4651-bd21-4507ede5c80f X-Archives-Hash: 57fd666a2657008092a3b48c87db70d5 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 script >> 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. 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