#!/bin/bash
cd /data/target || exit 1check_pro()
{
sleep 1
echo "***********************************"
echo "target进程信息如下"
echo "`ps axu|grep target|grep -v grep`"
echo "***********************************"
sleep 1
}
check_pro
echo "停止服务"
for pid in `ps axu|grep target|grep -v grep|awk '{print $2}'`;do
sudo -ulucifer kill $pid;
done
check_pro
echo "启动服务"
sudo -ulucifer php target.php
check_pro
echo "重起完毕,程序退出"
exit 0