Commit fc24aa7f authored by 段孔乐's avatar 段孔乐

modify install script

parent b35c5716
......@@ -10,5 +10,7 @@ initConf
sudo systemctl stop filebeat.serivce 2>/dev/null
sudo systemctl start ${serviceName}.service
green "filebeat install success"
green "============================================="
green "systemctl status -l filebeat # to see status"
green "tail -50f $(pwd)/logs/filebeat # to see log"
green "============================================="
\ No newline at end of file
#!/bin/bash
if [ "$(pwd | grep -c 'filebeat')" -gt 0 ]; then rm -rf "$(pwd)"; else red "script location is incorrect, run me in filebeat installation directory"; fi
if [ "$(pwd | grep -c 'filebeat')" -gt 0 ]; then echo "script location is incorrect, run me in filebeat installation directory"; fi
source ./util.sh
sudo systemctl disable filebeat 2>/dev/null
sudo systemctl stop filebeat 2>/dev/null
rm -rf /etc/systemd/system/filebeat.serivce
sudo systemctl daemon-reload
rm -rf "$(pwd)"
green "uninstall succeed"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment