Starting jprante elasticsearch-jdbc importer script as service -


this script:

dir="$( cd "$( dirname "${bash_source[0]}" )" && pwd )" bin=${dir}/../ lib=${dir}/../../lib  echo ' {     "type" : "jdbc",     "jdbc" : {         "schedule" : "0 0/1 * 1/1 * ? *",         "url" : "jdbc:mysql://localhost:3306/mydb",         "user" : "",         "password" : "",         "elasticsearch" : {             "cluster" : "elasticsearch",             "host" : "localhost",             "port" : 9300         },         "sql" : [             {                 "statement" : "/var/test.sql"             }         ],         "index" : "myindex",         "type" : "mytype"     } } ' | java \     -cp "${lib}/*" \     -dlog4j.configurationfile=${bin}/log4j2.xml \     org.xbib.tools.runner \     org.xbib.tools.jdbcimporter 

when run script & @ end works should, there better way run script? service maybe ?


Comments