[systemd-devel] a little help with $MAINPID please
lux-integ
lux-integ at btconnect.com
Sat Feb 23 10:01:18 PST 2013
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
thanks in anticipation
regards
lluxInteg
More information about the systemd-devel
mailing list