Bogg wrote:
>
> I'm sorry, I don't understand where to or what to actually add for
In the file /home/tc/SQLITE-control.sh, make the two changes highlighted
in bold below. I'm clutching at straws I'm afraid - I don't believe
this is the cause of the problem, but it's a loophole that should be
closed anyway.
Code:
--------------------
SQLITErestart() {
local logfile=$1
local attempts=5 # number of tries
local interval=1 # interval between tries (seconds)
*local result*
local count=$attempts
*local* status="Squeezelite not running."
while [ "$status" == "Squeezelite not running." ]; do
if [ $((count--)) -le 0 ]; then
log "Squeezelite failed to initialize within $attempts
attempts." $logfile
exit 1
fi
result="$(sudo /usr/local/etc/init.d/squeezelite restart)"
log "$result" $logfile
sleep $interval
status="$(sudo /usr/local/etc/init.d/squeezelite status)"
log "$status" $logfile
done
# determine cardname from squeezelite process id
local PID=$(sudo /usr/local/etc/init.d/squeezelite status | awk -F PID=
{'print $2'})
local cardname=$(ps | grep $PID | awk -F CARD= {'print $2'} | awk -F ,
{'print $1'})
log "Restoring alsa settings for $cardname" $logfile
sudo /usr/local/sbin/alsactl restore $cardname
}
--------------------
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=113661
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix