为什么在rails项目中touch /tmp/restart.txt 这个文件就可以达到更新服务的目的?

一般在rails+nginx+passenger在修改部分代码后,通常touch 一下/tmp/restart.txt就可以更新项目,这个和nginx -s reload 的作用是一样的,我想问一下.这个做的原理是什么呢?

阅读 4.8k
1 个回答

这个是passneger官方文档的解释
http://www.modrails.com/documentation...

Phusion Passenger checks whether the timestamp of this file has changed in order to determine whether the application should be restarted.
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进