Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] looking for a couple of systemd units
Date: Tue, 27 Aug 2013 04:18:38
Message-Id: CADPrc80CNYBpHAqyJ4tD-DV9X3kBUCWiXTisuLXLhh9WMT0WSQ@mail.gmail.com
In Reply to: Re: [gentoo-user] looking for a couple of systemd units by "Canek Peláez Valdés"
1 On Mon, Aug 26, 2013 at 11:06 PM, Canek Peláez Valdés <caneko@×××××.com> wrote:
2 > On Mon, Aug 26, 2013 at 10:52 PM, <covici@××××××××××.com> wrote:
3 >> Hi. I am looking for a couple of systemd units which I have not been
4 >> able to find -- one for mailman and one for innd which is a shell script
5 >> by itself.
6 >>
7 >> Thanks in advance for any suggestions.
8 >
9 > I use this one in production for mailman with Gentoo:
10 >
11 > ----------------------------------------------------------------
12 > [Unit]
13 > Description=Mailman mailing list service
14 > After=network.target
15 >
16 > [Service]
17 > Type=forking
18 > ExecStart=/usr/lib/mailman/bin/mailmanctl -s start
19 > ExecStop=/usr/lib/mailman/bin/mailmanctl stop
20 > User=mailman
21 > Group=mailman
22 >
23 > [Install]
24 > WantedBy=multi-user.target
25 > ----------------------------------------------------------------
26 >
27 > I don't have any for innd.
28
29 If innd is the one from net-nntp/inn, then the following should work:
30
31 ----------------------------------------------------------------
32 [Unit]
33 Description=The Internet News daemon
34 Documentation=man:innd(8)
35 ConditionPathExists=/var/run/news
36
37 [Service]
38 Type=simple
39 ExecStart=/usr/lib/news/bin/rc.news
40 ExecStop=/usr/lib/news/bin/rc.news stop
41 User=news
42 Group=news
43
44 [Install]
45 WantedBy=multi-user.target
46 ----------------------------------------------------------------
47
48 If the binary rc.news forks itself (and there is no option to force it
49 to run in the foreground), use Type=forking. The former is preferred
50 over the latter. Also, to guarantee that the directory /var/run/news
51 always is present, add the following to a new file
52 /etc/tmpfiles.d/innd.conf:
53
54 ----------------------------------------------------------------
55 d /var/run/news 0755 news news 10d -
56 ----------------------------------------------------------------
57
58 You can replace 10d with - (hypen), so the directory is never cleaned
59 automatically. If you try this unit and it works as expected, please
60 let us know.
61
62 Regards.
63 --
64 Canek Peláez Valdés
65 Posgrado en Ciencia e Ingeniería de la Computación
66 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] looking for a couple of systemd units covici@××××××××××.com