# How to generate init scripts for community beats?

**URL:** https://discuss.elastic.co/t/how-to-generate-init-scripts-for-community-beats/44493
**Category:** Beats
**Created:** [March 15, 2016, 9:53pm UTC](https://discuss.elastic.co/t/how-to-generate-init-scripts-for-community-beats/44493 "2016-03-15T21:53:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [March 15, 2016, 9:53pm UTC](https://discuss.elastic.co/t/how-to-generate-init-scripts-for-community-beats/44493/1 "2016-03-15T21:53:58Z")

</div>

I was just experimenting with [apachebeat](https://github.com/radoondas/apachebeat). I was able to get it working well on the test server. Then I was ready to add it to more server, but realized that it did not come with an init file.

What is the best way to get init files working for community beats that don't have them already? On Ubuntu, CentOS, etc.

I did find [this](https://github.com/elastic/beats/blob/master/dev-tools/packer/platforms). so I assume there's a way for beat owners to generate init scripts automatically.

Is there a way I could do that myself?

Hmm... could I change [line 10 in this file](https://github.com/elastic/beats/blob/master/dev-tools/packer/Makefile#L10) from:

```auto
winlogbeat/win \

```

To:

```auto
winlogbeat/win apachebeat/deb \

```

to get an apachebeat.deb file with the correct init script? Assuming I check apachebeat out into the root of the beats directory.

I'm currently making the docker images, then I try it myself.

I'm posting this first because I'm hoping someone will have a cleaner way of doing this. 🙂

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [March 18, 2016, 8:27am UTC](https://discuss.elastic.co/t/how-to-generate-init-scripts-for-community-beats/44493/2 "2016-03-18T08:27:21Z")

</div>

We recently added a folder dev-tools/packer to beats generated based on beat-generator. This allows to create packages. The folder can be found here: [https://github.com/elastic/beat-generator/tree/master/{{cookiecutter.beat}}/dev-tools/packer](https://github.com/elastic/beat-generator/tree/master/%7B%7Bcookiecutter.beat%7D%7D/dev-tools/packer)

The easiest way would be probably to open a PR with this dev-tools folder to the apachebeat and check if it works with apachebeat. There are some dependencies on the `Makefile` like `build-bofore` is required.

Let me know if you need some more details or get stuck.

---

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [March 18, 2016, 8:17pm UTC](https://discuss.elastic.co/t/how-to-generate-init-scripts-for-community-beats/44493/3 "2016-03-18T20:17:23Z")

</div>

Hmm, I was experimenting with what is in the dev-tools/packer directory in the main beats repo. Didn't get very far... I'll try again soon with the link you gave me. Thanks.

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [March 21, 2016, 7:39am UTC](https://discuss.elastic.co/t/how-to-generate-init-scripts-for-community-beats/44493/4 "2016-03-21T07:39:13Z")

</div>

@jerrac Let me know if you run into some problems as this is still very fresh.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 9:54pm UTC](https://discuss.elastic.co/t/how-to-generate-init-scripts-for-community-beats/44493/5 "2017-07-05T21:54:27Z")

</div>


