#!/bin/bash
#
# Daemon Name: reveam
#  
# description: 

# Source function library.
. /etc/init.d/functions

prog=revescan
lockfile=/lib/reveAM/Cdata/$prog

start() { 
    #Make some checks for requirements before continuing
    [ -x /lib/reveAM/AntiMalware/scanner/$prog ] || exit 5

    # Start our daemon daemon
    echo -n $"Starting $prog: "
    daemon --pidfile /lib/reveAM/Cdata/${prog}.pid /lib/reveAM/AntiMalware/scanner/$prog
    RETVAL=$?
    echo

    #If all is well touch the lock file
    [ $RETVAL -eq 0 ] && touch $lockfile
    return $RETVAL
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  status)
        status $prog
        ;;

   *)
        echo $"Usage: $0 {start|status}"
        exit 2
esac
