summaryrefslogtreecommitdiffstats
path: root/icecast
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-09-15 14:49:47 +0000
committer Eric Hameleers <alien@slackware.com>2010-09-15 14:49:47 +0000
commit5e4617c8927936c8ba04c8e7b2d80ead06b33bb7 (patch)
tree9b8fc6eaa615a7b5eea19a92b7e0137372451dc5 /icecast
parent3abc9aca2138f371b2395c3150ad0f5bd9f99d07 (diff)
downloadasb-5e4617c8927936c8ba04c8e7b2d80ead06b33bb7.tar.gz
asb-5e4617c8927936c8ba04c8e7b2d80ead06b33bb7.tar.xz
Small cleanups
Diffstat (limited to 'icecast')
-rw-r--r--icecast/build/rc.icecast.new26
1 files changed, 12 insertions, 14 deletions
diff --git a/icecast/build/rc.icecast.new b/icecast/build/rc.icecast.new
index c67488d1..b5873ac6 100644
--- a/icecast/build/rc.icecast.new
+++ b/icecast/build/rc.icecast.new
@@ -5,18 +5,19 @@
# /etc/rc.d/rc.icecast
# This shell script takes care of starting and stopping
# the icecast server, plus the "ices" source client.
-# * Eric Hameleers <alien@slackware.com>
+# Author:
+# Eric Hameleers <alien@slackware.com>
#
[ -x /usr/bin/icecast ] || exit 0
start() {
# Start daemons.
- echo -n "Starting icecast: /usr/bin/icecast -c /usr/share/icecast/etc/icecast.xml "
- if [ ! -f /usr/share/icecast/etc/icecast.xml ]; then
+ echo -n "Starting icecast: /usr/bin/icecast -c /etc/icecast/icecast.xml "
+ if [ ! -f /etc/icecast/icecast.xml ]; then
echo "... configuration file not found!"; exit 0
fi
- /usr/bin/icecast -b -c /usr/share/icecast/etc/icecast.xml
+ /usr/bin/icecast -b -c /etc/icecast/icecast.xml
echo
if [ -x /usr/bin/ices ]; then
sleep 3
@@ -36,19 +37,15 @@ stop() {
killall -TERM icecast
echo
}
-restart() {
- stop
- start
-}
status() {
PIDS1=$(pidof icecast)
PIDS2=$(pidof ices)
- if [ "$PIDS1" == "" ]; then
+ if [ "x$PIDS1" = "x" ]; then
echo "icecast is not running!"
else
echo "icecast is running at pid(s) ${PIDS1}."
fi
- if [ "$PIDS2" == "" ]; then
+ if [ "x$PIDS2" = "x" ]; then
echo "ices is not running!"
else
echo "ices is running at pid(s) ${PIDS2}."
@@ -67,18 +64,18 @@ current() {
index=0
while read cueline; do
echo "${desc[$index]} $cueline"
- index=`expr $index + 1`
+ index=$(expr $index + 1)
done < /var/state/ices/ices.cue
else
- echo "I found no running 'ices' icecast streamer!"
+ echo "I found no running 'ices' icecast source client!"
fi
}
next() {
if [ ! -f /var/state/ices/ices.pid ]; then
- echo "Can't skip to next track... can't find ices streamer."
+ echo "Can't skip to next track... can't find ices source client."
else
echo "Skipping to next track in playlist..."
- kill -USR1 `cat /var/state/ices/ices.pid`
+ kill -USR1 $(cat /var/state/ices/ices.pid)
fi
}
@@ -92,6 +89,7 @@ case "$1" in
;;
restart)
stop
+ sleep 2
start
;;
status)