开发者

Passenger (Rails)- way to restart via link?

Has anyone found a decent way to restart Passenger via a link? I need it for an admin so that they can just click a link (with a unique hash for protection) whenever our VPS 开发者_运维技巧provider has issues, if necessary.

I've tried having a secure link to a controller that just "touches" the tmp/restart.txt as well as writing to it, to no avail.

Any ideas?


You realize that this would need to be properly protected behind authentication and permission management right? Try using the FileUtils module from Ruby core.

You can use it by calling FileUtils.touch(filename) and its documentation is located here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜