#!/bin/bash

[ -e log ] || mkdir log
[ -e data ] || mkdir data
[ -e tmp ] || mkdir tmp
[ -e log/hprof ] || mkdir log/hprof

# Create required folders
{%- for f in folders.create %}
[ -e "{{ f }}" ] || mkdir -p "{{ f }}"
{%- endfor%}

(
  exec bin/start.sh $*
) >> log/sh.log 2>&1 &

echo "$!" > pid.pid
