McCormickk
12.10.05, 00:28
Ich will Shoutcast per rc-Skript starten und hab deswegen dieses Script geschrieben (naja, ein vorhandenes abgewandelt):
#! /bin/sh
#
# shoutcast
PATH=/usr/local/bin/shoutcast:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/shoutcast/sc_serv
NAME=Shoutcast
DESC=Shoutcast
# Defaults
CONFIG=/usr/local/bin/shoutcast/sc_serv.conf
USERID=shoutcast
GROUPID=shoutcast
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --chuid $USERID:$GROUPID \
--exec $DAEMON $CONFIG -b
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
echo "$NAME."
;;
reload|force-reload)
echo "Reloading $DESC configuration files."
start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
;;
restart)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
sleep 1
start-stop-daemon --start --chuid $USERID:$GROUPID \
--exec $DAEMON $CONFIG -b
echo "$NAME."
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
Shoutcast startet anstandslos, und es lässt sich auch anstandslos per Winamp/DSP-Plugin füttern, nur bricht es früher oder später (eher früher) mit einem "/etc/init.d/shoutcast: line 45: 914 Segmentation fault start-stop-daemon --start --chuid $USERID:$GROUPID --exec $DAEMON $CONFIG" ab, wenn sich ein Listener in den Stream einklinkt (Line 45 ist das "esac").
Das selbe geschieht, wenn ich den "start-stop-daemon ..." Befehl manuell aufrufe, hier allerdings etwas später.
Wird das Programm mit "./sc_serv" aufgerufen (ebenfalls unter Benutzer "shoutcast"), läuft alles bestens.
Ich hab Debian 3.1 stable und Shoutcast 1.9.5. Die Zugriffsberechtigungen sind richtig gesetzt (rw(x) für den Benutzer Shoutcast für das Programmverzeichnis und dessen Inhalt).
Was mache ich falsch?
#! /bin/sh
#
# shoutcast
PATH=/usr/local/bin/shoutcast:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/shoutcast/sc_serv
NAME=Shoutcast
DESC=Shoutcast
# Defaults
CONFIG=/usr/local/bin/shoutcast/sc_serv.conf
USERID=shoutcast
GROUPID=shoutcast
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --chuid $USERID:$GROUPID \
--exec $DAEMON $CONFIG -b
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
echo "$NAME."
;;
reload|force-reload)
echo "Reloading $DESC configuration files."
start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
;;
restart)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
sleep 1
start-stop-daemon --start --chuid $USERID:$GROUPID \
--exec $DAEMON $CONFIG -b
echo "$NAME."
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
Shoutcast startet anstandslos, und es lässt sich auch anstandslos per Winamp/DSP-Plugin füttern, nur bricht es früher oder später (eher früher) mit einem "/etc/init.d/shoutcast: line 45: 914 Segmentation fault start-stop-daemon --start --chuid $USERID:$GROUPID --exec $DAEMON $CONFIG" ab, wenn sich ein Listener in den Stream einklinkt (Line 45 ist das "esac").
Das selbe geschieht, wenn ich den "start-stop-daemon ..." Befehl manuell aufrufe, hier allerdings etwas später.
Wird das Programm mit "./sc_serv" aufgerufen (ebenfalls unter Benutzer "shoutcast"), läuft alles bestens.
Ich hab Debian 3.1 stable und Shoutcast 1.9.5. Die Zugriffsberechtigungen sind richtig gesetzt (rw(x) für den Benutzer Shoutcast für das Programmverzeichnis und dessen Inhalt).
Was mache ich falsch?