anchor.diff:  
   start() {
       [ ! -z "$(get_pid)" ] && { status; return 1; }
  -    echo -n $"Starting ${process_name}:"
  -    # TODO - background using sinatra option?
  -    su - <%=  APP[:run_as] %> -s /bin/bash -c "cd <%= $nagira_root %> && RACK_ENV=production bundle exec ./nagira.rb" > <%= APP[:log] %> 2>&1 &
  +    echo -n $"Starting ${process_name}:    "
  +    su - <%=  APP[:run_as] %> -s /bin/bash -c "rvm use <%= APP[:rvm] %> && cd <%= $nagira_root %> && RACK_ENV=production bundle exec ./nagira.rb" > <%= APP[:log] %> 2>&1 &
       sleep 5
       process=$(get_pid)
  +    echo $process > $pid_file
       if [ -z "$process" ]; then
  -        echo "   [FAIL]"
  +        echo "[FAIL]"
       else
  -        echo "    OK"
  +        echo "[OK]"
       fi
   }
   
  
positive.code: # description: Start-up file for Nagira monitoring component, Nagios RESTful API. See also: http://dmytro.github.com/nagira
  # processname: ruby ./nagira.rb
  # config: TBD
  
  init_rvm () {
      source /usr/local/rvm/scripts/rvm > /dev/null 2>&1 
      rvm use <%= APP[:rvm] %> --default > /dev/null 2>&1 
  }
  
  process_name="Sinatra Nagira services"
  
  
negative.code:     # TODO: need testing
      local process=$(get_pid)
      kill $process
      \rm -f $pid_file
      RETVAL=$?
      sleep 2
      [ -z "$(get_pid)" ] && { echo OK; return $RETVAL; }
  