You can remove that line from teh script if you want to, all it does is see if it went well, and print the [OK] or [FAILED] according to it.
Since you already use:
source /etc/init.d/functions
I would guess this would have the same effect:
Code:
#!/bin/sh
source /etc/init.d/functions
FAH="/home/mcdours/fah/FAH3Console-Linux.exe"
cd /home/mcdours/fah/ >/dev/null 2>&1
RETVAL=1
case "$1" in
start)
echo -n "Starting Folding@Home client ... "
su mcdours -c "$FAH >/dev/null 2>&1 &"
RETVAL=$?
;;
stop)
echo -n "Stopping Folding@Home's FAH3Console-Linux.exe ..."
killproc FAH3Console-Linux.exe
RETVAL=$?
;;
restart)
$0 stop
/usr/bin/sleep 1
$0 start
RETVAL=$?
;;
status)
statusproc FAH3Console-Linux.exe
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
Bookmarks