开发者

Passenger (Rails)- way to restart via link?

开发者 https://www.devze.com 2023-03-26 21:41 出处:网络
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

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

精彩评论

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