On a headless RaspberryPi, I would like to automatically start radio on boot, without any human action. I have written this file as
[Unit] Description=Radio Wants=network-online.target After=network.target network-online.target [Service] Type=oneshot ExecStart=/usr/bin/mplayer http://audio.scdn.arkena.com/11016/fip-midfi128.mp3 & RemainAfterExit=yes [Install] WantedBy=multi-user.target
Unfortunately it doesn't work: after boot, doing
systemctl status radio shows :
Loaded: loaded (/etc/systemd/system/radio.service; disabled)
Active: inactive (dead)
I think the
After are necessary because an "up" network is required, as described here.
Should I change
RemainAfterExit? Or remove the
& at the end of
ExecStart? Something else?