Created
September 6, 2016 05:36
-
-
Save xiocode/3368b20f7d673e230f0069387415304d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
| export PATH | |
| LOGSTASHPID=`ps ux | grep logstash | grep java | grep agent | awk '{ print $2 }'` | |
| if [ "x$LOGSTASHPID" = "x" ]; then | |
| echo "logstash not running!" | |
| service logstash restart | |
| else | |
| echo $LOGSTASHPID | |
| kill -9 $LOGSTASHPID | |
| service logstash restart | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment