Thanks both Pauls - just working my way through the init.d script now. WWWROOT is not used. And what I can't fathom is if there's a problem with the environment in Bogg's fresh pCP7 install, why isn't there a problem with the environment in my fresh pCP7 install?
Bogg wrote: > Here's my adjusted script. The stop part is in there as far I can see. > I've (hopefully) just changed the 2 local bits near the beginning, and > the sudo line just now. > > 33671 > > Starting from a fresh reboot, dac on, working sqlite etc, then dac off, > and dac back on. > M6 Log > > Code: -------------------- > > [ 18.48] Script parameters: find M6 > [ 18.55] Searching for M6 with idVendor=0d8c and idProduct=0004 in dmesg > [ 18.59] M6 detected on 1-1.2 > [ 18.61] Restoring alsa settings for M6 > [ 67.33] Script parameters: stop M6 1-1.2:1.1 > [ 67.33] Script parameters: stop M6 1-1.2:1.0 > [ 67.47] Script parameters: stop M6 1-1.2:1.2 > [ 67.49] Script parameters: stop M6 1-1.2 > [ 67.50] M6 on 1-1.2 removed > [ 67.53] Stopping Squeezelite player: Squeezelite... > [ 67.55] /tmp/M6.kername deleted > [ 90.64] Script parameters: restart M6 1-1.2 > [ 90.65] M6 detected on 1-1.2 > [ 91.72] Restarting Squeezelite player... > Squeezelite is not running. > Starting Squeezelite player: Squeezelite... > [ 92.76] Squeezelite not running. > [ 93.82] Restarting Squeezelite player... > Squeezelite is not running. > Starting Squeezelite player: Squeezelite... > [ 94.86] Squeezelite not running. > [ 95.92] Restarting Squeezelite player... > Squeezelite is not running. > Starting Squeezelite player: Squeezelite... > [ 96.96] Squeezelite not running. > [ 98.02] Restarting Squeezelite player... > Squeezelite is not running. > Starting Squeezelite player: Squeezelite... > [ 99.06] Squeezelite not running. > [ 100.12] Restarting Squeezelite player... > Squeezelite is not running. > Starting Squeezelite player: Squeezelite... > [ 101.16] Squeezelite not running. > [ 101.17] Squeezelite failed to initialize within 5 attempts. -------------------- > > > > /etc/udev/rules.d/10-M6.rules > > Code: -------------------- > > SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0d8c", ATTR{idProduct}=="0004", RUN+="/home/tc/SQLITE-control.sh restart M6 $kernel" > SUBSYSTEM=="usb", ACTION=="remove", RUN+="/home/tc/SQLITE-control.sh stop M6 $kernel" > -------------------- > > Thanks - that all looks fine, and the log file shows that the init.d script has been asked to stop the process, and then its status report confirms that it thinks the process has stopped. What I can see in the init.d script is that the status check will only return 'Squeezelite is running. PID=xxxxx' if there's a process ID stored in /var/run/squeezelite.pid AND there's a currently running squeezelite process with the same process ID. Otherwise it will return 'Squeezelite not running.' So for pCP to report that it's not running, but for it to continue to work in LMS, I can only conclude that the stop command has deleted /var/run/squeezelite.pid but didn't actually kill the process. The bit of the init.d script that handles this is: Code: -------------------- stop) if [ ! -f $PIDFILE ]; then echo "$PNAME is not running." exit 1 fi echo "Stopping $DESC: $PNAME..." start-stop-daemon --stop --quiet -p $PIDFILE sudo rm -f $PIDFILE ;; -------------------- So there's an opportunity in there for an inconsistency to appear: the $PIDFILE will be deleted immediately after the start-stop-daemon is asked to stop the process, without checking that the process was actually stopped. Is it possible that the start-stop-daemon isn't actually succeeding in stopping the process for some reason? ------------------------------------------------------------------------ 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 unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix