Update cli.sh

pull/424/head
midoks 2 years ago
parent ae7afc2eb5
commit e5acf206f5
  1. 4
      cli.sh

@ -16,7 +16,7 @@ mw_start_task()
{ {
isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}') isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}')
if [ "$isStart" == '' ];then if [ "$isStart" == '' ];then
echo -e "Starting mw-tasks... \c" echo -e "starting mw-tasks... \c"
cd $DIR && python3 task.py >> ${DIR}/logs/task.log 2>&1 & cd $DIR && python3 task.py >> ${DIR}/logs/task.log 2>&1 &
sleep 0.3 sleep 0.3
isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}') isStart=$(ps aux |grep 'task.py'|grep -v grep|awk '{print $2}')
@ -30,7 +30,7 @@ mw_start_task()
fi fi
echo -e "\033[32mdone\033[0m" echo -e "\033[32mdone\033[0m"
else else
echo "Starting mw-tasks... mw-tasks (pid $(echo $isStart)) already running" echo "starting mw-tasks... mw-tasks (pid $(echo $isStart)) already running"
fi fi
} }

Loading…
Cancel
Save