<% @path = "/etc/init/torquebox.conf" @backup = false %> description "This is an upstart job file for TorqueBox" pre-start script bash << "EOF" mkdir -p /var/log/torquebox chown -R <%= rubber_env.app_user %> /var/log/torquebox EOF end script start on started network-services stop on stopped network-services respawn script bash << "EOF" su - <%= rubber_env.app_user %> <%= rubber_env.torquebox_dir %>/jboss/bin/standalone.sh >> /var/log/torquebox/torquebox.log 2>&1 EOF end script