Detect if Rails web server is running on local computer

Before shutting down iTerm2, I'd like to confirm that no Rails web server is running. One way would be to try to connect to http://localhost:3000/ and see if I get an error. But how would I do that?

At present I put up an alert when iTerm is quit, but I would like to go a step beyond that.

Thanks for any suggestions.

You can use the Get a URL action to access that URL and return a result. Turn off the error notification and turn off the aborting of the macro on failure (both in the action (gear) :gear: menu).

Then use the Action Result condition to test whether the action succeeded or failed.

1 Like