版权声明:使用中有任何问题,可以留言。能解答尽量解答。 https://blog.csdn.net/liyyzz33/article/details/87094595
例子:
重启filebeat
#!/bin/bash
pid=`ps -ef | grep "filebeat" | grep php_api.yml | awk '{printf $2}'`
echo $pid
kill -9 $pid
cd /data/logs/
nohup /data/elk/filebeat-6.0.0/filebeat -e -c /data/elk/filebeat-6.0.0/php_api.yml &