Am 23.02.2013 19:01, schrieb lux-integ: > Greetings > > I am an absolute beginner with systemd. I came across the gentoo systemd > script > ( http://en.gentoo-wiki.com/wiki/Systemd ) > for mysql-daemon. It has these lines:- > > ExecStart=/usr/sbin/mysqld --pid-file=/var/run/mysqld/mysqld.pid > ExecStop=/bin/kill -15 $MAINPID > PIDFile=/var/run/mysqld/mysqld.pid > > I am curious and puzzled about two things. > a) What is $MAINPID which I have seen in so many systemd scripts > i.e. where is is set? or how is it determined? > b) what are the advantages or disadvantaes of the following line > ExecStop=/bin/kill -15 $(/bin/pidof mysqld) > over > ExecStop=/bin/kill -15 $MAINPID
systemd simply knows the PID because it has started the service and crontrols it - why would you want to use external commands if the init-system has all needed informations because it is it's job to have them
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
