Ok.. the full script is;
Code:
--------------------
!/bin/bash
#
# /etc/rc.d/init.d/squeezeslave
#
# Starts the squeezeslave daemon
#
# chkconfig: 345 99 10
# description: runs the squeezeslave daemon
# processname: squeezeslave
start() {
# Check if it is already running
echo -n $"Starting squeezeslave daemon: "
if [ ! `pstree | grep -c squeezeslave-alsa` -gt 1 ]; then
# start squeezeslave
/usr/bin/squeezeslave-alsa --retry -s -m 00:00:00:00:00:FF >/dev/null 2>&1 &
fi
echo
}
stop() {
echo -n $"Stopping squeezeslave daemon: "
for i in `ps ax | grep -v grep | grep squeezeslave| cut -c 1-6`
do
kill $i
done
echo
}
checkstatus()
if [ ! `pstree | grep -c squeezeslave` -gt 1 ]; then
echo -n $"squeezeslave is stopped"
echo
else
echo "squeezeslave (pid `ps ax | grep -v grep | grep -m 1 squeezeslave | cut
-c 1-6`) is running..."
fi
case "$1" in
start)
start
;;
stop)
stop
;;
status)
checkstatus
;;
*)
echo $"Usage: $0 {start|stop|status}"
exit 1
esac
exit 0
--------------------
--
Lem
------------------------------------------------------------------------
Lem's Profile: http://forums.slimdevices.com/member.php?userid=22702
View this thread: http://forums.slimdevices.com/showthread.php?t=58696
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins