I've made the startup daemon script that I use on Raspbian compatible with piCore.
The advantage is that all the functions in the script (auto-play, change favorite etc.) can now be used on piCore too.
The tutorial now descibes how to use it.
If you want to change your current installation to use this daemon script, execute these commands:
tce-load -wi bash.tcz
sudo ln -s /tmp/tcloop/bash/usr/local/bin/bash /bin/bash
sudo echo "bin/bash" >> /opt/.filetool.lst
sudo wget http://www.gerrelt.nl/RaspberryPi/squeezelitehf.sh
sudo mv squeezelitehf.sh /usr/local/etc/init.d/squeezelite
sudo chmod a+x /usr/local/etc/init.d/squeezelite
sudo wget http://www.gerrelt.nl/RaspberryPi/squeezelite_settings.sh
sudo mv squeezelite_settings.sh /usr/local/bin
sudo chmod a+x /usr/local/bin/squeezelite_settings.sh
sudo echo "usr/local/etc/init.d/squeezelite" >> /opt/.filetool.lst
sudo echo "usr/local/bin/squeezelite_settings.sh" >> /opt/.filetool.lst
sudo cp /opt/bootlocal.sh /opt/bootlocal.sh.old
Now, open the settings script with:
sudo nano /usr/local/bin/squeezelite_settings.sh
And change the settings that you also did in the bootlocal.sh script (saved to /opt/bootlocal.sh.old).
You probably only changed the soundcard.
Now change the bootlocal.sh script to the new daemon script. Open the script:
sudo nano /opt/bootlocal.sh
And remove all the lines below "# when using wifi, connect to wifi before this line".
And put this line there in it's place:
/usr/local/etc/init.d/squeezelite start
Now, don't forget to save it all to the SD card:filetool.sh -b
And carelessly
unplug and plug in the raspberry to do a reboot.
Squeezelite should now be started automatically.
Daemon script functionsThis script has more functions then just starting squeezelite. It contains funtions that do autoplay, play a favorite, stop playing, set volume and update squeezelite.
Especially the autoplay function is usefull, it will send the "play" command to the raspberry. With this you can make the player automatically start playing when the raspbery is booted.
This function can be triggered by the SL_AUTO_PLAY setting in the squeezelite_settings.sh file.
Also the play favorite function can be handy. You could schedule to play certain internet radio stations at certain times.