Operation [elasticsearch-watcher_watch] and lang [groovy] are disabled

I'm getting this error while I'm trying to push a _watcher configuration to elasticsearch:
{"error":{"root_cause":[{"type":"script_exception","reason":"failed to compile script [ScriptException[scripts of type [inlin], operation [elasticsearch-watcher_watch] and lang [groovy] are disabled]] with lang [return [ body: groovy.json.JsonOutput.toJson(ctx.payload.hits.hits)]] of type [groovy]"}],"type":"script_exception","reason":"failed to compile script [ScriptException[scripts of type [inline], operation [elasticsearch-watcher_watch] and lang [groovy] are disabled]] with lang [return [ body: groovy.json.JsonOutput.toJson(ctx.payload.hits.hits)]] of type [groovy]"},"status":500}[

I'm using elasticsearch docker image and I've edit the elasticsearch.yml file and I've write the following,

echo "script.engine.groovy.inline.aggs: on" >> /etc/elasticsearch/elasticsearch.yml 
echo "script.engine.groovy.inline.mapping: on" >> /etc/elasticsearch/elasticsearch.yml 
echo "script.engine.groovy.inline.search: on" >> /etc/elasticsearch/elasticsearch.yml 
echo "script.engine.groovy.inline.update: on" >> /etc/elasticsearch/elasticsearch.yml 
echo "script.engine.groovy.inline.plugin: on" >> /etc/elasticsearch/elasticsearch.yml 

I restart the container but nothing happens, the error still occurs. Am I missing something? Thanks

Ping @colings86 can you help me?
Also is it possible to run those options has parameters such as: -Des.script.engine.groovy.inline.search=on?

Hey @aanm, have you been able to figure out the reason? Im currently attempting to setup a watch under the same conditions, but no luck so far.

Edited :

It should work with:
script.engine.groovy.inline.elasticsearch-watcher_watch: on

The error indicates :
[ScriptException[scripts of type [inline], operation [elasticsearch-watcher_watch] and lang [groovy] are disabled]] the Operation: elasticsearch-watcher_watch and the script lang is: groovy

script.engine.<script_lang>.<execution_type>.<operation>

Where the basic operations are described at:
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#enable-dynamic-scripting