runServes.sh 917 B

123456789101112131415161718
  1. sudo ps -aux|grep supervisord |grep -v grep|awk '{print $2}'|sudo xargs kill
  2. sudo ps -aux|grep laravel-echo-server |grep -v grep|awk '{print $2}'|sudo xargs kill
  3. #sudo ps -aux|grep artisan |grep -v grep|awk '{print $2}'|sudo xargs kill
  4. # sudo ps -aux|grep goExport |grep -v grep|awk '{print $2}'|sudo xargs kill
  5. cd /var/www/was
  6. nohup sudo su root -c "laravel-echo-server start" >/dev/null 2>&1 &
  7. nohup sudo su baoshi -c "sudo supervisord -c /var/www/was/horizon.conf" >/dev/null 2>&1 &
  8. #nohup sudo su baoshi -c "php artisan queue:work --tries=2 --delay=2" >/dev/null 2>&1 &
  9. # nohup sudo ./serves/goExports >/dev/null 2>&1 &
  10. isExistStr=$(cat /etc/crontab|grep '* * * * * root cd /var/www/was && php artisan schedule:run >> /dev/null 2>&1')
  11. if [ ! -n "$isExistStr" ]; then
  12. sudo echo -e '\n* * * * * root cd /var/www/was && php artisan schedule:run >> /dev/null 2>&1' >> /etc/crontab
  13. fi
  14. sudo systemctl restart crond