1 |
Canek Peláez Valdés <caneko@×××××.com> wrote: |
2 |
|
3 |
> On Mon, Aug 26, 2013 at 11:06 PM, Canek Peláez Valdés <caneko@×××××.com> wrote: |
4 |
> > On Mon, Aug 26, 2013 at 10:52 PM, <covici@××××××××××.com> wrote: |
5 |
> >> Hi. I am looking for a couple of systemd units which I have not been |
6 |
> >> able to find -- one for mailman and one for innd which is a shell script |
7 |
> >> by itself. |
8 |
> >> |
9 |
> >> Thanks in advance for any suggestions. |
10 |
> > |
11 |
> > I use this one in production for mailman with Gentoo: |
12 |
> > |
13 |
> > ---------------------------------------------------------------- |
14 |
> > [Unit] |
15 |
> > Description=Mailman mailing list service |
16 |
> > After=network.target |
17 |
> > |
18 |
> > [Service] |
19 |
> > Type=forking |
20 |
> > ExecStart=/usr/lib/mailman/bin/mailmanctl -s start |
21 |
> > ExecStop=/usr/lib/mailman/bin/mailmanctl stop |
22 |
> > User=mailman |
23 |
> > Group=mailman |
24 |
> > |
25 |
> > [Install] |
26 |
> > WantedBy=multi-user.target |
27 |
> > ---------------------------------------------------------------- |
28 |
> > |
29 |
> > I don't have any for innd. |
30 |
> |
31 |
> If innd is the one from net-nntp/inn, then the following should work: |
32 |
> |
33 |
> ---------------------------------------------------------------- |
34 |
> [Unit] |
35 |
> Description=The Internet News daemon |
36 |
> Documentation=man:innd(8) |
37 |
> ConditionPathExists=/var/run/news |
38 |
> |
39 |
> [Service] |
40 |
> Type=simple |
41 |
> ExecStart=/usr/lib/news/bin/rc.news |
42 |
> ExecStop=/usr/lib/news/bin/rc.news stop |
43 |
> User=news |
44 |
> Group=news |
45 |
> |
46 |
> [Install] |
47 |
> WantedBy=multi-user.target |
48 |
> ---------------------------------------------------------------- |
49 |
> |
50 |
> If the binary rc.news forks itself (and there is no option to force it |
51 |
> to run in the foreground), use Type=forking. The former is preferred |
52 |
> over the latter. Also, to guarantee that the directory /var/run/news |
53 |
> always is present, add the following to a new file |
54 |
> /etc/tmpfiles.d/innd.conf: |
55 |
> |
56 |
> ---------------------------------------------------------------- |
57 |
> d /var/run/news 0755 news news 10d - |
58 |
> ---------------------------------------------------------------- |
59 |
> |
60 |
> You can replace 10d with - (hypen), so the directory is never cleaned |
61 |
> automatically. If you try this unit and it works as expected, please |
62 |
> let us know. |
63 |
> |
64 |
|
65 |
OK, thanks again. I have one question which this brings up -- and this |
66 |
applies to openrc as well -- I never have let it migrate /var/run to |
67 |
/run and /var/lock likewise because I have directories in those which |
68 |
are owned by various users, etc. and the packages themselves almost |
69 |
never create such -- is putting things in /etc/tmpfiles.d the correct |
70 |
way to fix this? |
71 |
|
72 |
|
73 |
-- |
74 |
Your life is like a penny. You're going to lose it. The question is: |
75 |
How do |
76 |
you spend it? |
77 |
|
78 |
John Covici |
79 |
covici@××××××××××.com |