代码拉取完成,页面将自动刷新
同步操作将从 铅笔刀/sc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
basepath=$(cd `dirname $0`; pwd)
chmod a+x "$basepath/yii"
command="$basepath/yii queue/listen 1"
command2="$basepath/yii queue3/listen 1"
result=$(ps -ef | grep "`echo $command`" | grep -v "grep")
result2=$(ps -ef | grep "`echo $command2`" | grep -v "grep")
if [ ! -n "$result" ]
then
echo "Starting the process."
str=$(nohup $command >/dev/null 2>&1 &)
echo -e "\033[32mOk.\033[0m"
else
echo "The process has been started."
fi
if [ ! -n "$result2" ]
then
echo "Starting the process3."
str=$(nohup $command2 >/dev/null 2>&1 &)
echo -e "\033[32mOk.\033[0m"
else
echo "The process3 has been started."
fi
result=$(crontab -l|grep -i "* * * * * $basepath/queue.sh"|grep -v grep)
if [ ! -n "$result" ]
then
echo -e "\033[32mCreating queue crontab.\033[0m"
echo "Export crontab data"
crontab -l > createcrontemp
echo "Add new crontab line"
echo "* * * * * $basepath/queue.sh" >> createcrontemp
echo "Import crontab data"
crontab createcrontemp
echo "Delete temp file"
rm -f createcrontemp
echo -e "\033[32mCreating queue crontab success.\033[0m"
else
echo "The queue crontab has been add ."
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。