The code below is the contents of the darkice.service file. Once you’ve created this file (it didn’t exist before you do this), you’re that much closer to having a darkice auto-run system.
#supposed to prevent darkice.service from starting before network is up and running
ExecStart=/usr/bin/darkice -c darkice1.cfg
#need the -c since config file is not where exec file is, note the darkice#.cfg
#this is where the darkice config file resides, i suppose it could be anywhere, like /home/pi
#I’m not sure how or if this works, but need to figure that out
#necessary because default is 100ms, and something makes it fail if not stretched out
#not sure this is necessary but belt-and-suspenders, doncha know.
Save the above file contents as darkice.service. Then move this file to the folder /etc/systemd/system with
sudo mv /etc/darkice.service /etc/systemd/system/
Now, run the command
sudo systemctl enable darkice.service
Once you’re done with that, it’s time to reboot.
At least on my RPi, it takes about 23 seconds from boot to the point it connects to railroadradio.net. PDC.