On 03/01/2013 08:00 PM, John Burrell wrote: > I installed lfs with systemd and encountered no problems at all - to my mild > surprise. > > Encouraged by this, I've been adding blfs packages and have now come up > against the question of starting various daemons. > > For example, I installed mysql and used the mysql.service file from > Arch-Linux as a guide. > But when I do systemctl start mysql, it fails because the dir /run/mysql > doesn't exist. > If I create it and > > chown mysql.mysql /run/mysql > > the systemctl command successfully starts the daemon. > > So my question is: > > What is the correct (systemd) way to create the dir /run/mysql and change > owner so mysql will start at boot time? > > Thanks > > jb. > (definitely a systemd neophyte) >
$ cat /lib/systemd/system/mysqld.service [Unit] Description=MySQL Server After=network.target [Service] User=mysql Group=mysql ExecStart=/usr/bin/mysqld --pid-file=/var/run/mysqld/mysqld.pid Restart=always PrivateTmp=true [Install] WantedBy=multi-user.target $ cat /etc/tmpfiles.d/mysql.conf d /var/run/mysqld 0755 mysql mysql - You're welcome. -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page