1. 程式人生 > >linux 啟動服務,關閉服務指令碼

linux 啟動服務,關閉服務指令碼

start.sh

#!/bin/sh
sleep 2
kill -s 9 `ps -ef | grep /home/crmhdcc/web/huacrm/apache-tomcat-7.0.64/ | grep -v grep | awk '{print $2}'`
rm -rf /home/crmhdcc/web/huacrm/apache-tomcat-7.0.64/work/Catalina
rm -rf /home/crmhdcc/web/huacrm/apache-tomcat-7.0.64/logs/*
/home/crmhdcc/web/huacrm/apache-tomcat-7.0.64/bin/startup.sh  &

stop.sh

#!/bin/sh
kill -s 9 `ps -ef | grep /home/crmhdcc/web/huacrm/apache-tomcat-7.0.64/ | grep -v grep | awk '{print $2}'`