summaryrefslogtreecommitdiffstats
path: root/icecast/build/ices_current
blob: 398beec15cd62bd137603c6b37d10d24345e69fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# $Id$
# ---------------------------------------------------------------------------
# Display the contents of the ices cue file 
# Eric Hameleers <alien@slackware.com>
#
#CURR_ICES=`ps wax | grep 'etc/ices.*conf' | grep -v grep | awk '{print $1}'`
#CURR_ICES=`pidof ices`
CURR_ICES=`cat /var/state/ices/ices.pid`

if ! [ "$CURR_ICES" == "" ]; then
  echo "Ices proc. #:  $CURR_ICES"
  desc=("Filename:     " \
        "Filesize:     " \
        "Bitrate:      " \
        "Playing time: " \
        "% elapsed:    " \
        "Ices index:   " \
        "Artist:       " \
        "Song Title:   ")
  index=0
  while read cueline; do
    echo "${desc[$index]} $cueline"
    index=`expr $index + 1`
  done < /var/state/ices/ices.cue
else
  echo "I found no running 'ices' ICECAST streamer!"
fi