# Installing plugin through shell script without prompt

**URL:** <https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456>\
**Category:** Elasticsearch\
**Created:** [May 3, 2017, 8:24pm UTC](https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456 "2017-05-03T20:24:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayanna\_Hallur](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Jayanna\_Hallur](https://discuss.elastic.co/u/Jayanna_Hallur)\
**Post date:** [May 3, 2017, 8:24pm UTC](https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456/1 "2017-05-03T20:24:27Z")

</div>

Hi

I want to include the plugin installation as part of automation scripts which will install the elastic nodes & install the plugins.

In the ES documentation, I dont see any option for forcing to accept "y" or dont prompt for y/n or by default install it.

root@ip-205-2-40:/usr/share/elasticsearch/plugins# sh /tmp/install\_s3rep.sh  
-\> Downloading file:///root/repository-s3-5.2.2.zip  
[=================================================] 100%  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  
@ WARNING: plugin requires additional permissions @  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

- java.lang.RuntimePermission accessDeclaredMembers
- java.lang.RuntimePermission getClassLoader
- java.lang.reflect.ReflectPermission suppressAccessChecks  
See [http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html](http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html)  
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]

====

root@ip-205-2-40:/usr/share/elasticsearch/plugins# /usr/share/elasticsearch/bin/elasticsearch-plugin --help  
A tool for managing installed elasticsearch plugins

## Commands

list - Lists installed elasticsearch plugins  
install - Install a plugin  
remove - Removes a plugin from elasticsearch

Non-option arguments:  
command

Option Description

* * *

-h, --help show help  
-s, --silent show minimal output  
-v, --verbose show verbose output  
root@ip-205-2-40:/usr/share/elasticsearch/plugins#

I don't want it to be prompted for y/n input from user. Is there any parameter I shall pass it in command line?

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [May 3, 2017, 8:31pm UTC](https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456/2 "2017-05-03T20:31:48Z")

</div>

You can pass the `--batch` flag.

---

<div class="post-metadata">

**Author:** ![Jayanna\_Hallur](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Jayanna\_Hallur](https://discuss.elastic.co/u/Jayanna_Hallur)\
**Post date:** [May 4, 2017, 1:40pm UTC](https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456/3 "2017-05-04T13:40:21Z")

</div>

Thanks. It worked with the --batch flag. It will be nice if they update in the documentation.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [May 4, 2017, 1:52pm UTC](https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456/4 "2017-05-04T13:52:41Z")

</div>

It is documented if you ask for help from the `install` command:

```auto
$ elasticsearch-plugin install --help
Install a plugin

The following official plugins may be installed by name:
  analysis-icu
  analysis-kuromoji
  analysis-phonetic
  analysis-smartcn
  analysis-stempel
  analysis-ukrainian
  discovery-azure-classic
  discovery-ec2
  discovery-file
  discovery-gce
  ingest-attachment
  ingest-geoip
  ingest-user-agent
  mapper-murmur3
  mapper-size
  repository-azure
  repository-gcs
  repository-hdfs
  repository-s3
  store-smb
  x-pack

Non-option arguments:
plugin id            

Option Description                                            
------ -----------                                            
-E <KeyValuePair> Configure a setting                                    
-b, --batch Enable batch mode explicitly, automatic confirmation of
                     security permission                                  
-h, --help show help                                              
-s, --silent show minimal output                                    
-v, --verbose show verbose output  

```

---

<div class="post-metadata">

**Author:** ![Jayanna\_Hallur](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Jayanna\_Hallur](https://discuss.elastic.co/u/Jayanna_Hallur)\
**Post date:** [May 4, 2017, 2:38pm UTC](https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456/5 "2017-05-04T14:38:39Z")

</div>

Thanks.

I meant, in the documentation where they given information about installing plugin i.e at [https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3.html)

As per the plugin help o/p there is no information about help on command too..

Syntax should have been  
elasticsearch-plugin [command] --help|plugin-name

root@ip-205-2-40:/usr/share/elasticsearch/bin# ./elasticsearch-plugin --help  
A tool for managing installed elasticsearch plugins

## Commands

list - Lists installed elasticsearch plugins  
install - Install a plugin  
remove - Removes a plugin from elasticsearch

Non-option arguments:  
command

Option Description

* * *

-h, --help show help  
-s, --silent show minimal output  
-v, --verbose show verbose output  
root@ip-205-2-40:/usr/share/elasticsearch/bin#

thanks anyways for the information.

---

<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:** [June 1, 2017, 2:45pm UTC](https://discuss.elastic.co/t/installing-plugin-through-shell-script-without-prompt/84456/6 "2017-06-01T14:45:39Z")

</div>

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