# Elastic-Agent deb package invalid init script

**URL:** <https://discuss.elastic.co/t/elastic-agent-deb-package-invalid-init-script/258994>\
**Category:** Elasticsearch\
**Tags:** elastic-agent\
**Created:** [December 17, 2020, 12:57pm UTC](https://discuss.elastic.co/t/elastic-agent-deb-package-invalid-init-script/258994 "2020-12-17T12:57:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt\_t1](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matt\_t1](https://discuss.elastic.co/u/matt_t1)\
**Post date:** [December 17, 2020, 12:57pm UTC](https://discuss.elastic.co/t/elastic-agent-deb-package-invalid-init-script/258994/1 "2020-12-17T12:57:22Z")

</div>

The deb package for elastic-agent v7.10.1 creates `/etc/init.d/elastic-agent` which is not a valid init script and interferes with the proper systemd unit at `/lib/systemd/system/elastic-agent.service`.

---

<div class="post-metadata">

**Author:** ![EricDavisX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericdavisx/32/73456_2.png) [@EricDavisX](https://discuss.elastic.co/u/EricDavisX)\
**Post date:** [December 17, 2020, 2:04pm UTC](https://discuss.elastic.co/t/elastic-agent-deb-package-invalid-init-script/258994/2 "2020-12-17T14:04:22Z")

</div>

Hello @matt_t1 thanks for the post. We have identified and fixed this, here:

> <https://github.com/elastic/beats/issues/22744>
>
> On enrolling the .deb 7.11-SNAPSHOT package agent, we are getting the following message
> "Usage: /etc/init.d/elastic-agent {start|stop|status|restart|force-reload}"
> and are unable to enroll the .deb...

Sorry for the inconvenience, the 7.10.2 update and all releases onward should have the fix.

Regards,  
Eric

---

<div class="post-metadata">

**Author:** ![matt\_t1](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matt\_t1](https://discuss.elastic.co/u/matt_t1)\
**Post date:** [December 17, 2020, 3:56pm UTC](https://discuss.elastic.co/t/elastic-agent-deb-package-invalid-init-script/258994/3 "2020-12-17T15:56:57Z")

</div>

Perfect, thank you @EricDavisX. I'll wait for the patch release and test again.

---

<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:** [January 14, 2021, 3:57pm UTC](https://discuss.elastic.co/t/elastic-agent-deb-package-invalid-init-script/258994/4 "2021-01-14T15:57:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
