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.
精彩评论