# Logstash Post Install of plugins

**URL:** <https://discuss.elastic.co/t/logstash-post-install-of-plugins/269348>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [April 6, 2021, 3:31pm UTC](https://discuss.elastic.co/t/logstash-post-install-of-plugins/269348 "2021-04-06T15:31:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dallas\_Toth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dallas_toth/32/22630_2.png) [@Dallas\_Toth](https://discuss.elastic.co/u/Dallas_Toth)\
**Post date:** [April 6, 2021, 3:31pm UTC](https://discuss.elastic.co/t/logstash-post-install-of-plugins/269348/1 "2021-04-06T15:31:38Z")

</div>

For those who are struggeling with the install of plugins and having them install on spinning up a container I have wrote this  
mount the file from your volumn outside the container  
to Container Path: /usr/share/logstash/config/plugins.sh  
add a post argument  
sh /usr/share/logstash/config/plugins.sh  
file contents

```auto
#!binbash

echo running post install scripts for plugins..;
logstash-plugin install logstash-filter-sentimentalizer
logstash-plugin install logstash-input-mysql
echo finished post install scripts for plugins..;
sleep 1
exec logstash 

```

the exec logstash is what kicks logstash into starting after the plugin installs.

---

<div class="post-metadata">

**Author:** ![Dallas\_Toth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dallas_toth/32/22630_2.png) [@Dallas\_Toth](https://discuss.elastic.co/u/Dallas_Toth)\
**Post date:** [April 6, 2021, 3:47pm UTC](https://discuss.elastic.co/t/logstash-post-install-of-plugins/269348/2 "2021-04-06T15:47:46Z")

</div>

If anyone has any input on how I can omitt the plugins.sh from running on just a basic restart of the container I would be interested in your advice.

---

<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:** [May 4, 2021, 3:48pm UTC](https://discuss.elastic.co/t/logstash-post-install-of-plugins/269348/3 "2021-05-04T15:48:47Z")

</div>

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