anchor.diff:  }
   
   function setup_bosh_environment() {
  -  JOB_NAME=mesos-slave
  -  LOG_DIR=/var/vcap/sys/log/$JOB_NAME
  -  RUN_DIR=/var/vcap/sys/run/$JOB_NAME
  -  PIDFILE=$RUN_DIR/$JOB_NAME.pid
     mkdir -p $LOG_DIR
     mkdir -p $RUN_DIR
     chown --recursive vcap:vcap $LOG_DIR
  
positive.code: 
  set -e 
  set -u 
  
  function setup_java_environment() {
    export JAVA_HOME=/var/vcap/packages/openjdk/jdk/
  
negative.code:     --master=zk://<%= p("mesos.zookeeper.ip") %>:<%= p("mesos.zookeeper.port") %>/mesos 
      --no-switch_user 
      --hostname=$LIBPROCESS_IP 
      --executor_registration_timeout=3mins
    )  
      
    echo $$ > $PIDFILE
  
    exec chpst -u vcap:vcap $MESOS_HOME/bin/mesos-slave.sh ${flags[*]} \
      1>>$LOG_DIR/$JOB_NAME.stdout.log \
      2>>$LOG_DIR/$JOB_NAME.stderr.log 
      
  }
  
  function kill_mesos() {
  