You are not logged in.
Hello. I'm trying to create a init script for Ices2. I took the Icecast one and modified a little bit , but when I try to start the daemon, the stat stays on BUSY, like this:
{phantom} [~]$ sudo /etc/rc.d/ices start
Password:
:: Starting Ices2 Daemon [BUSY]
Ices actually starts, but the prompt remains frozen in BUSY. Shouldn't it say DONE and return to the prompt like any other init script?
This is the modified script:
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/bin/ices`
case "$1" in
start)
stat_busy "Starting Ices2 Daemon"
[ -z "$PID" ] && /usr/bin/ices /home/phantom/software/ices/config.xml &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
echo $PID > /var/run/ices.pid
add_daemon ices
stat_done
fi
;;
stop)
stat_busy "Stopping Ices2 Daemon"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm /var/run/ices.pid
rm_daemon ices
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
Thanks.
Offline
What happens if you issue
/usr/bin/ices /home/phantom/software/ices/config.xml
on the command line in a shell by itself. Does it return to the prompt or does it just sit there?
FaunOS: Live USB/DVD Linux Distro: http://www.faunos.com
Offline
Actually, it does the same, it sits there...:|
Offline
Is the background-setting set to 1 in your ices config file?
<background>1</background>
Last edited by smoon (2007-04-15 16:24:04)
Offline
Jeez, I knew it was something stupid. Thank you both, guys, doing what smoon said fixed the problem
Last edited by Xarathur (2007-04-15 17:32:20)
Offline