WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Squeezelite startup / test / update etc... script  (Read 2961 times)

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Squeezelite startup / test / update etc... script
« on: September 29, 2014, 03:34:25 PM »
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.
Quote
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 :
Code: [Select]
cp /usr/local/share/sample/squeezelite.conf ~/.squeezelite.conf
Now when run first time :
Code: [Select]
sudo /usr/local/etc/init.d/squeezelite startSqueezelite is automatic downloaded into ~/.squeezelite-audio

enjoy...

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  :D ::

#!/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)
#
#######################################################################################