On Tue, Aug 27, 2013 at 10:55 AM, Stefan G. Weichinger <li...@xunil.at> wrote:
>
> While we are at it ...
>
> I am currently migrating one of my basement servers ... it boots and
> runs with systemd already.
>
> I am fiddling with service-files for:
>
> mysql
> mythbackend
> tftp-hpa
>
> (more to come)
>
> working my way through ... making arch-linux-files fit etc.
>
> If someone already has those for gentoo ... pls post and share!

This is my mysqld.service file used in production with Gentoo:

----------------------------------------------------------------
[Unit]
Description=mySQL Server
After=network.target
Documentation=man:mysqld(8)

[Service]
Type=simple
ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf
--basedir=/usr --datadir=/var/lib/mysql
--pid-file=/var/run/mysqld/mysqld.pid
--socket=/var/run/mysqld/mysqld.sock
ExecStop=/bin/kill -15 $MAINPID
PIDFile=/var/run/mysqld/mysql.pid
Restart=always
CPUSchedulingPolicy=idle
CPUSchedulingPriority=0

[Install]
WantedBy=multi-user.target
----------------------------------------------------------------

You can omit/ignore the CPScheduling* entries (it runs in a very old
machine, and I need mysql not to hog all the CPU).

Also, I use this in /etc/tmpfiles.d/mysqld.conf:

----------------------------------------------------------------
D /run/mysqld 0755 mysql mysql - -
----------------------------------------------------------------

I don't use mythbackend nor tftp-hpa, but if you have the init scripts
for them it should be easy to write the corresponding unit files.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply via email to