#!/bin/bash

lockfile=/var/run/player.pid
playlist=/store/playlist
    while [ -f /var/run/player.pid ] ; do 
	if [ -f $playlist ] ; then
	date1=`date`    
	echo "$date1 started playing playlist /store/out/playlist " >>/store/log
	cat $playlist >>/store/log
	xsetroot -cursor /usr/share/blank_cursor /usr/share/blank_cursor
	    /usr/bin/xine -n -pfhq --no-splash -g -P $playlist
    
	else 
	    sleep 120s
	fi
    done
