Answers for "restart elasticsearch"

1

how to restart elasticsearch node

sudo service elasticsearch.service status -l    
sudo service elasticsearch.service restart

Restart Elasticsearch services ^^
Posted by: Guest on December-15-2020
1

restart elasticsearch

sudo systemctl restart elasticsearch
Posted by: Guest on September-01-2021
1

bash script to restart elasticsearch

#!/bin/sh

RESTART="/etc/init.d/elasticsearch restart"
SERVICE="elasticsearch"
LOGFILE="/var/log/elasticRestart.log"

ps -ef | grep elastic | grep -v grep > /dev/null
if [ $? -eq 0 ]
then
        /etc/init.d/elasticsearch restart >> /var/log/elasticRestart.log
        echo "Elasticsearch relaunched at $(date)" >> /var/log/elasticRestart.log
else
        echo "Elasticsearch is running $(date)" >> /var/log/elasticRestart.log
fi
Posted by: Guest on July-10-2020

Code answers related to "restart elasticsearch"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language