jschorr
jschorr

Reputation: 3054

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?

Upvotes: 0

Views: 72

Answers (1)

Devin M
Devin M

Reputation: 9752

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.

Upvotes: 1

Related Questions