代码拉取完成,页面将自动刷新
同步操作将从 LepusGroup/lepus 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
basedir="/usr/local/lepus"
#check basedir
#############################################################################
if test -z "$basedir"
then
basedir=/usr/local/lepus
else
basedir="$basedir"
fi
arg=$1
lepus_process=`ps -ef|grep lepus.py |grep -v grep|wc -l`
case "$arg" in
'status')
#check lepus status
if [ $lepus_process -ge "2" ];then
echo "lepus server is running..."
else
echo "lepus server is not run!"
fi
;;
'start')
#start lepus
if [ $lepus_process -ge "2" ];then
echo " lepus server is already run!"
else
cd $basedir && nohup python lepus.py &> logs/lepus.log&
sleep 5
lepus_process=`ps -ef|grep lepus.py |grep -v grep|wc -l`
if [ $lepus_process -ge "2" ];then
echo "lepus server start success!"
else
echo "lepus server start fail!"
fi
fi
;;
'stop')
#stop lepus
if [ $lepus_process -le "2" ];then
echo "lepus server is not running!"
else
ps -ef |grep -i -E "lepus.py"|grep -v -E "vi|grep"|awk '{print $2}' |while read line; do kill $line; echo "lepus processes id $line been stop"; done
#killall python lepus.py*
fi
;;
'--help')
#for help
echo "lepus help:"
echo "support-site: www.lepus.cc"
echo "===================================================================="
echo "start Start lepus monitor server; Command: #lepus start"
echo "stop Stop lepus monitor server; Command: #lepus stop"
echo "status Check lepus monitor run status; Command: #lepus status"
;;
*)
echo "Please input --help to read the help info."
;;
esac
exit 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。