Skip to content

Commit

Permalink
Can disabled plugin via elasticsearch.plugin:disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nboire committed Apr 3, 2013
1 parent 64aed37 commit 0f1997a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ public IndexPlugin(Application application)
this.application = application;
}

private boolean isPluginDisabled() {
String status = application.configuration().getString("elasticsearch.plugin");
return status != null && status.equals("disabled");
}

@Override
public boolean enabled() {
return isPluginDisabled() == false;
}

@Override
public void onStart()
{
Expand Down
2 changes: 2 additions & 0 deletions module/conf/reference.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## ElasticSearch Configuration
##############################
# uncomment this line for desactive plugin
# elasticsearch.plugin="disabled"

######################
## Settings Elasticsearch
Expand Down

0 comments on commit 0f1997a

Please sign in to comment.