bmn
Joined: 03 Aug 2008 Posts: 12
|
Posted: Mon Jun 22, 2009 2:04 pm Post subject: ices0 reports failed to /sbin/service on success? o_O |
|
|
| Code: |
$ sudo /etc/init.d/ices0 stop
Shutting down ices0 source daemon: [ OK ]
$ sudo /etc/init.d/ices0 status
ices0 is stopped
$ sudo /etc/init.d/ices0 start
Starting ices0 source daemon: [FAILED]
$ sudo /etc/init.d/ices0 status
ices0 (pid 9460) is running... |
I'm using a slightly modified Icecast init script. An Ices2 version that's practically the same script works without any problems on the same machine, and Ices0 is working after running "ices0 start".
| Code: |
#!/bin/bash
#
# ices0 This shell script takes care of starting and stopping
# the ices audio stream supplier.
#
# chkconfig: - 85 15
# description: Ices0 sends an MP3 stream to Icecast
# processname: ices0
# pidfile: /var/log/ices/ices.pid
# config: /usr/local/etc/ices.conf
# Source function library.
. /etc/rc.d/init.d/functions
[ -x /usr/bin/ices0 ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n $"Starting ices0 source daemon: "
daemon "/usr/bin/ices0 -B > /dev/null"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ices0
;;
stop)
# Stop daemon.
echo -n $"Shutting down ices0 source daemon: "
killproc ices0
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ices0
;;
status)
status ices0
RETVAL=$?
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n $"Reloading ices0: "
killproc ices0 -HUP
RETVAL=$?
echo
;;
condrestart)
[ -f /var/lock/subsys/ices0 ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload}"
RETVAL=1
;;
esac |
Any ideas why service is reporting that the start failed, when it was actually a success? I normally wouldn't mind, but it's messing with the service monitor... |
|