mac 监控文件变化并重启php

it2022-05-05  98

自己撸一个框架,需要监控代码变化

安装fswatch

brew install fswatch

shell重启PHP脚本reload.sh

#!/bin/sh do ps -ef | grep php | grep -v grep | awk '{print $2}' | xargs kill -9 php /Users/x/www/php/LightMoon/examples/index.php done

监控文件变化目录

fswatch -0 /Users/x/www/php/LightMoon| xargs -0 -n 1 /Users/x/www/php/LightMoon/bin/reload.sh

转载于:https://www.cnblogs.com/xielisen/p/10682216.html

相关资源:各显卡算力对照表!

最新回复(0)