Socket.sh 355 B

12345678910
  1. #!/bin/bash
  2. basepath=$(cd `dirname $0`; pwd)
  3. cd $basepath
  4. if [ -f "runtime/hyperf.pid" ];then
  5. cat runtime/hyperf.pid | awk '{print $1}' | xargs kill && rm -rf runtime/hyperf.pid && rm -rf runtime/container
  6. echo 'hyperf service stop...'
  7. fi
  8. date=`date +%Y-%m-%d`
  9. nohup php bin/hyperf.php start > runtime/logs/nohup.log 2>&1 &
  10. echo 'hyperf service start...'