The script gives wrong exit status. The RETVAL variable (on the last line) is mis-spelled. It should be $RETVAL instead of $REVAL. People using this script to check if the service is running will not be warned if the process crashes.