anchor.diff:  JOB_DIR=/var/vcap/jobs/route-registrar
   RUN_DIR=/var/vcap/sys/run/route-registrar
   LOG_DIR=/var/vcap/sys/log/route-registrar
  +
   PIDFILE=$RUN_DIR/route_registrar.pid
  +CONFIG_FILE=/var/vcap/jobs/riak-cs/config/registrar_settings.yml
  +
   source /var/vcap/packages/common/utils.sh
   
   export HOME=/var/vcap
  
positive.code: ;;
  
  *)
  echo "Usage: route_registrar_ctl {start|stop}" ;;
  
  esac
  exit 0
  
negative.code:   mkdir -p $JOB_DIR
    mkdir -p $LOG_DIR
  
    # Update registrar_settings.yml with current IP address
    IP_ADDR=`ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' | tail -1`
    sed -i "s/127.0.0.1/$IP_ADDR/" $CONFIG_FILE
  
    pid_guard $PIDFILE $JOB_NAME
  
    /var/vcap/packages/route-registrar/bin/route-registrar \
    -pidfile=$PIDFILE \
    -configFile=$CONFIG_FILE \
    >>$LOG_DIR/route-registrar.stdout.log 2>>$LOG_DIR/route-registrar.stderr.log&
  ;;
  
  stop)
  