Skip to content

Instantly share code, notes, and snippets.

@reanim8ed
Created October 26, 2023 19:46
Show Gist options
  • Save reanim8ed/f0dd93b955211caf8ce2839054312b14 to your computer and use it in GitHub Desktop.
Save reanim8ed/f0dd93b955211caf8ce2839054312b14 to your computer and use it in GitHub Desktop.
[Auto restart elasticsearch services after crash] #elastic
  • Edit elasticsearch service unit file using the following command
sudo systemctl edit elasticsearch.service
  • This command will create a file

/etc/systemd/system/elasticsearch.service.d/override.conf

  • Now, add the following lines in the unit file.
[Service]
Restart=always
  • Refresh the unit file using command
sudo systemctl daemon-reload
  • Can check the changes using command
sudo systemctl cat elasticsearch.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment