Gentoo Archives: gentoo-user

From: "Stefan G. Weichinger" <lists@×××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] looking for a couple of systemd units
Date: Tue, 27 Aug 2013 16:16:50
Message-Id: 521CD0E3.10906@xunil.at
In Reply to: Re: [gentoo-user] looking for a couple of systemd units by "Canek Peláez Valdés"
1 Am 27.08.2013 18:02, schrieb Canek Peláez Valdés:
2 > On Tue, Aug 27, 2013 at 10:55 AM, Stefan G. Weichinger <lists@×××××.at> wrote:
3 >>
4 >> While we are at it ...
5 >>
6 >> I am currently migrating one of my basement servers ... it boots and
7 >> runs with systemd already.
8 >>
9 >> I am fiddling with service-files for:
10 >>
11 >> mysql
12 >> mythbackend
13 >> tftp-hpa
14 >>
15 >> (more to come)
16 >>
17 >> working my way through ... making arch-linux-files fit etc.
18 >>
19 >> If someone already has those for gentoo ... pls post and share!
20 >
21 > This is my mysqld.service file used in production with Gentoo:
22 >
23 > ----------------------------------------------------------------
24 > [Unit]
25 > Description=mySQL Server
26 > After=network.target
27 > Documentation=man:mysqld(8)
28 >
29 > [Service]
30 > Type=simple
31 > ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf
32 > --basedir=/usr --datadir=/var/lib/mysql
33 > --pid-file=/var/run/mysqld/mysqld.pid
34 > --socket=/var/run/mysqld/mysqld.sock
35 > ExecStop=/bin/kill -15 $MAINPID
36 > PIDFile=/var/run/mysqld/mysql.pid
37 > Restart=always
38 > CPUSchedulingPolicy=idle
39 > CPUSchedulingPriority=0
40 >
41 > [Install]
42 > WantedBy=multi-user.target
43 > ----------------------------------------------------------------
44 >
45 > You can omit/ignore the CPScheduling* entries (it runs in a very old
46 > machine, and I need mysql not to hog all the CPU).
47 >
48 > Also, I use this in /etc/tmpfiles.d/mysqld.conf:
49 >
50 > ----------------------------------------------------------------
51 > D /run/mysqld 0755 mysql mysql - -
52 > ----------------------------------------------------------------
53
54
55 Shouldn't it be /var/run/mysqld ... ?
56
57 I had a similar service-file .... still fiddling to make it work,
58 nearly there. Thanks!
59
60
61 > I don't use mythbackend nor tftp-hpa, but if you have the init scripts
62 > for them it should be easy to write the corresponding unit files.
63
64 mythtv-Wiki provided a service file ... I will check after mysqld ...
65
66 Stefan

Replies

Subject Author
Re: [gentoo-user] looking for a couple of systemd units "Canek Peláez Valdés" <caneko@×××××.com>
Re: [gentoo-user] looking for a couple of systemd units "Stefan G. Weichinger" <lists@×××××.at>