One more possible gotcha with the init.d script:

run the start script, using sudo.

run the stop script, without sudo.

the pid file is now gone, but the squeezelite processes are still
there.

run the start script again, using sudo.

the script doesn't see a pidfile, so it starts a new squeezelite, and
records its pid.
but that squeezelite can't run, because another instance is already
running.  so it dies.
you still have the old squeezelite running, but the pidfile is now
incorrect.


Code:
--------------------
    ==kitchen(tc)>> sudo killall squeezelite
  ==kitchen(tc)>> sudo rm -f /var/run/squeezelite.pid 
  ==kitchen(tc)>> sudo /usr/local/etc/init.d/squeezelite start
  Starting Squeezelite player: Squeezelite...
  ==kitchen(tc)>> cat /var/run/squeezelite.pid 
  4918
  ==kitchen(tc)>> /usr/local/etc/init.d/squeezelite stop
  Stopping Squeezelite player: Squeezelite...
  start-stop-daemon: warning: killing process 4918: Operation not permitted
  ==kitchen(tc)>> cat /var/run/squeezelite.pid 
  cat: can't open '/var/run/squeezelite.pid': No such file or directory
  ==kitchen(tc)>> sudo /usr/local/etc/init.d/squeezelite start
  Starting Squeezelite player: Squeezelite...
  ==kitchen(tc)>> ps | grep s[q]ueeze
  4918 root      0:00 /usr/local/bin/squeezelite -n kitchen -o 
hw:CARD=SoundSticks,DEV=0 -a 80 4  1  -m 00 00 00 00 00 41 -s localhost
  ==kitchen(tc)>> cat /var/run/squeezelite.pid 
  4944
  
--------------------


Honestly, chill, I'm surprised you've done as well as you have, given
the tools you're working with.  :-)


------------------------------------------------------------------------
pgf's Profile: http://forums.slimdevices.com/member.php?userid=58510
View this thread: http://forums.slimdevices.com/showthread.php?t=113661

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to