1 2 3 4 5 6 7 8 9 10 11 12 13
[Unit] Description=ElasticSearch After=network.target [Service] User=elasticsearch Type=forking PIDFile=/run/elasticsearch/elasticsearch.pid ExecStart=/usr/bin/elasticsearch -p /run/elasticsearch/elasticsearch.pid Restart=on-failure [Install] WantedBy=multi-user.target