Greg Erskine wrote: > hi ferdicharms, > > Here's an idea that might work? > > This script submits a LMS command via the function pcp_lms_start_command > with a sleep command included. > > This script should be run from a User Command ie. > /home/tc/delaystart.sh > > > Code: -------------------- > > #!/bin/sh > > #======================================================================================== > # Delayed start > #---------------------------------------------------------------------------------------- > > . /var/www/cgi-bin/pcp-functions > . /var/www/cgi-bin/pcp-lms-functions > > DELAY=2 > LMSCOMMAND="playlist play https://st01.sslstream.dlf.de/dlf/01/high/aac/stream.aac" > DELAYSTARTLOG="pcp_delay_start_lms.log" > > echo "Delayed start: $DELAY" > sleep $DELAY > > echo "LMS command: $LMSCOMMAND" > ${LOGDIR}/${DELAYSTARTLOG} > pcp_lms_start_command "$LMSCOMMAND" >> ${LOGDIR}/${DELAYSTARTLOG} > -------------------- > > > > You could, if you wanted, remove the delay from the script and add the > delay to the front of the User Command: ie sleep 10; > /home/tc/delaystart.sh > > regards > Greg
Hi Greg, that's it! Great! So it works quite wonderfully with a delayed start. My piCorePlayer wakes up my Debianserver via wol and 60 seconds later the stream starts automatically. Fantastic. Thanks a lot. I'm a beginner in Linux and still have a small problem that I can't solve: I had to make the script executable with "chmod +x /home/tc/delaystart.sh". Only then it worked. But now that the script is executable, I can't change anything in the script (e.g. change the stream). Every change to the script is gone after a reboot and the first version is executed. How can I change the script after I made it executable with chmod +x? Or was "chmod +x" a mistake and I have to do it differently? ------------------------------------------------------------------------ ferdicharms's Profile: http://forums.slimdevices.com/member.php?userid=72788 View this thread: http://forums.slimdevices.com/showthread.php?t=116899 _______________________________________________ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix