I have added my service to systemd (I am running it on a pi3), it looks like this:
[Unit] Description=Oral-B BLE scanner service Wants=network-online.target After=network-online.target StartLimitBurst=10 StartLimitIntervalSec=10 Requires=bluetooth.target [Service] Type=simple WorkingDirectory=/home/pi/scripts ExecStart=/home/pi/scripts/scanOralB.py Restart=always RestartSec=10 [Install] WantedBy=network-online.target
I have added a symbolic link to the above file in /lib/systemd/system. I have enabled the service as well. Just to be sure I checked.
pi@raspberrypi:~ $ systemctl is-enabled scanOralB.service enabled
If I reboot and check the status it looks like this:
pi@raspberrypi:~ $ sudo systemctl status scanOralB.service * scanOralB.service - Oral-B BLE scanner service Loaded: loaded (/home/pi/scripts/scanOralB.service; enabled; vendor preset: enabled) Active: inactive (dead)
If I start the service manually it works just fine. Can someone explain why the service is not being started after boot? I get no extra output from journalctl either.