Hi all.
i find it rather learning, creating init scripts, and creating .tcz's, so i wrote this little squeezelite start script, and thought i would like to share it here.
Please feel free, to comment, rewrite, and so on... This script is working fine, for my setup,
The script can, start, restart, stop, status as usual scripts do.
Besides that the following options is present.
sudo /usr/local/etc/init.d/squeezelite test - shows which parameters squeezelite is started with
update - downloads newest squeezelite automatic
help - just shows squeezelite --help
It's working this way :
Place squeezelite.tcz in /mnt/mmcblk0p2/tce/optional
Place squeezelite.tcz line in /mnt/mmcblk0p2/tce/onboot.lst.
tc@box:~$ cat /mnt/mmcblk0p2/tce/onboot.lst
mc.tcz
openssh.tcz
nano.tcz
flac.tcz
libmad.tcz
libvorbis.tcz
alsa-utils.tcz
alsa-modules-3.16.3-piCore+.tcz
libasound-bin.tcz
rc-3.16.3-piCore+.tcz
lirc-staging.tcz
lirc-0.9.0.tcz
python.tcz
squeezelite.tcz
lcd-proc.tcz
The squeezelite.tcz is then executed onboot.
Before the init script is run the first time, copy the squeezelite.conf as this :
cp /usr/local/share/sample/squeezelite.conf ~/.squeezelite.conf
Now when run first time :
sudo /usr/local/etc/init.d/squeezelite start
Squeezelite is automatic downloaded into ~/.squeezelite-audioenjoy...
Regards... Jesper
I have attached a sample squeezelite.conf - just for the ease of it! (it's also placed in /usr/local/share/sample, after squeezelite.tcz is loaded)
SNIP of Code
::
#!/bin/sh
# init.d start script
#
# Created, with help from diff. sources
#
# Squeezelite
#
# Place configfile for start options in: /home/tc/.squeezelite.conf
# Sample placed in /usr/local/share/sample/squeezelite.conf
# Squeezelite, should be placed in /home/tc/.squeezelite-audio/squeezelite-armv6hf
# If Squeezelite, does not exist, it will be automatically downloaded
#
# Usage /usr/local/etc/init.d/squeezelite {start|stop|restart|status|test|update|help}
#
# Lykkedk (jesperlykke@gmail.com)
#
#######################################################################################