I had to install an older version of Elasticsearch (2.3.3) from source. The binary is located in /opt/local/elasticsearch-2.3.3/bin/
I created the following file
/Library/LaunchDaemons/org.elasticsearch.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.elasticsearch</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/elasticsearch-2.3.3/bin/elasticsearch</string>
</array>
<key>UserName</key>
<string>root</string>
<!-- <key>GroupName</key>
<string>staff</string> -->
<key>WorkingDirectory</key>
<string>/opt/local/elasticsearch-2.3.3/bin</string>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I then issue the following command:
sudo launchctl load -w /Library/LaunchDaemons/org.elasticsearch.plist
When I inquire with sudo launchctl list | grep elastic
it returns org.elasticsearch
. But when I check if elasticsearch is running with ps ax | grep elastic
it is not running.
Is there something wrong with my .plist
file?