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