Hello
I am trying to execute some commands before and after llightdm starts

This is how part of my /etc/init/lightdm.conf looks like:

Code:
    exec irsend SEND_ONCE AVR260 KEY_POWER &
    sleep 10 ;
    exec lightdm &
    sleep 30 ;
    exec irsend SEND_ONCE AVR260 KEY_POWER2
Code:
irsend SEND_ONCE AVR260 KEY_POWER
is used to turn on my amplituner
then i wanted to add some sleep to make sure it is up
after that lightdm should start
and when all services start from ~/.config/autostart
amplituner should be turned off by command
Code:
exec irsend SEND_ONCE AVR260 KEY_POWER2
So this is how it looks like now
On reboot amplituner starts - that part works fine.
On TV screen i am stuck on shell login screen and nothing hapends further
Then amplituner shuts down as expected.
So why i have problem with that "exec lightdm" command?
How can i modify this script to do what i want?

Happy New Year to everyone