Sha256: 0454924b4afaad5c33b8853a65e971e7543831567d5240b4e0b92ce861b36a9f

Contents?: true

Size: 840 Bytes

Versions: 21

Compression:

Stored size: 840 Bytes

Contents

#!/bin/bash
#cortex
#
# chkconfig: 345 80 10
# description: NetFox Agent

. /etc/rc.d/init.d/functions

NFAGENT_OPTS="-f /etc/nfagent.conf -d"
NFAGENT_PID=/var/run/nfagent.pid

if [ -f /etc/sysconfig/nfagent ]; then
  . /etc/sysconfig/nfagent
fi

start () {
  echo -n "Starting NetFox Agent: "
  /usr/bin/nfagent $NFAGENT_OPTS -i $NFAGENT_PID
  echo "Done"
}

stop() {
  echo -n $"Shutting down NetFox Agent: "
  if [ -f $NFAGENT_PID ]; then
    kill `cat $NFAGENT_PID`
    sleep 1
    echo "Done"
  else
    echo "NetFox Agent wasn't running"
  fi
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    sleep 2
    start
    RETVAL=$?
    ;;
  status)
    status nfagent
    RETVAL=$?
    ;;
  *)
    echo $"Usage: $0 {start|stop|restart|status}"
    exit 1
esac

exit $RETVAL

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
nfagent-1.0.0 nfagent.init.redhat.txt
nfagent-0.9.50 nfagent.init.redhat.txt
nfagent-0.9.31 nfagent.init.redhat.txt
nfagent-0.9.30 nfagent.init.redhat.txt
nfagent-0.9.29 nfagent.init.redhat.txt
nfagent-0.9.28 nfagent.init.redhat.txt
nfagent-0.9.27 nfagent.init.redhat.txt
nfagent-0.9.26 nfagent.init.redhat.txt
nfagent-0.9.20 nfagent.init.redhat.txt
nfagent-0.9.19 nfagent.init.redhat.txt
nfagent-0.9.17 nfagent.init.redhat.txt
nfagent-0.9.15 nfagent.init.redhat.txt
nfagent-0.9.13 nfagent.init.redhat.txt
nfagent-0.9.11 nfagent.init.redhat.txt
nfagent-0.9.10 nfagent.init.redhat.txt
nfagent-0.9.9 nfagent.init.redhat.txt
nfagent-0.9.8 nfagent.init.redhat.txt
nfagent-0.9.6 nfagent.init.redhat.txt
nfagent-0.9.5 nfagent.init.redhat.txt
nfagent-0.9.0 nfagent.init.redhat.txt