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 16:02:39
Message-Id: CADPrc82iHGwbWUrFLfqeM5OzEx=S-MAUTa5dxetEXcnyXKFxog@mail.gmail.com
In Reply to: Re: [gentoo-user] looking for a couple of systemd units by "Stefan G. Weichinger"
1 On Tue, Aug 27, 2013 at 10:55 AM, Stefan G. Weichinger <lists@×××××.at> wrote:
2 >
3 > While we are at it ...
4 >
5 > I am currently migrating one of my basement servers ... it boots and
6 > runs with systemd already.
7 >
8 > I am fiddling with service-files for:
9 >
10 > mysql
11 > mythbackend
12 > tftp-hpa
13 >
14 > (more to come)
15 >
16 > working my way through ... making arch-linux-files fit etc.
17 >
18 > If someone already has those for gentoo ... pls post and share!
19
20 This is my mysqld.service file used in production with Gentoo:
21
22 ----------------------------------------------------------------
23 [Unit]
24 Description=mySQL Server
25 After=network.target
26 Documentation=man:mysqld(8)
27
28 [Service]
29 Type=simple
30 ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf
31 --basedir=/usr --datadir=/var/lib/mysql
32 --pid-file=/var/run/mysqld/mysqld.pid
33 --socket=/var/run/mysqld/mysqld.sock
34 ExecStop=/bin/kill -15 $MAINPID
35 PIDFile=/var/run/mysqld/mysql.pid
36 Restart=always
37 CPUSchedulingPolicy=idle
38 CPUSchedulingPriority=0
39
40 [Install]
41 WantedBy=multi-user.target
42 ----------------------------------------------------------------
43
44 You can omit/ignore the CPScheduling* entries (it runs in a very old
45 machine, and I need mysql not to hog all the CPU).
46
47 Also, I use this in /etc/tmpfiles.d/mysqld.conf:
48
49 ----------------------------------------------------------------
50 D /run/mysqld 0755 mysql mysql - -
51 ----------------------------------------------------------------
52
53 I don't use mythbackend nor tftp-hpa, but if you have the init scripts
54 for them it should be easy to write the corresponding unit files.
55
56 Regards.
57 --
58 Canek Peláez Valdés
59 Posgrado en Ciencia e Ingeniería de la Computación
60 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] looking for a couple of systemd units "Stefan G. Weichinger" <lists@×××××.at>
Re: [gentoo-user] looking for a couple of systemd units covici@××××××××××.com