I am writing a simple script to be running in Raspbain on Raspberry Pi 2, simple turn a LED on to indicate I am ready to connect with SSH from my desktop computer.
The script is not important here, only to mention that as I use frequence control so the script is running an infinite loop, to turn the LED on and off frequently. So this is an example of simple service. However, at least the accepted answer of this question advise me to set the type to idle. So my service file looks like
[Unit] Description=Turn on LED after SSH is ready [Service] Type=idle ExecStart=/usr/bin/sshready.py [Install] Wants=network-online.target After=network-online.target
The service runs as expected. However, I noticed when I start putty in my desktop computer right after the LED turns on the login prompt not appear immidiately. So I checked with
$ systemd-analyze plot > output.svg
The result shows
It looks like my services starts not after
network-online.target, what is wrong here and how can I fix it?