--- /etc/init.d/._cfg0000_xdm 2017-04-01 12:07:28.000000000 +0300 +++ /etc/init.d/xdm 2017-07-16 11:51:05.550338041 +0300 @@ -113,7 +113,7 @@ *) # first find out if there is such executable EXE="$(command -v ${MY_XDM} 2>/dev/null)" - PIDFILE="/run/${MY_XDM}.pid" + PIDFILE="/run/${MY_XDM##*/}.pid" # warn user that he is doing sick things if the exe was not found if [ -z "${EXE}" ]; then