{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/c9f4f8ce2c2936bacaf49500b5a127dc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c9f4f8ce2c2936bacaf49500b5a127dc","url":"https://api.github.com/users/dbu","login":"dbu","id":76576},"updated_at":"2011-11-10T09:48:51Z","labels":[],"assignee":null,"comments":1,"closed_at":null,"url":"https://api.github.com/repos/sixty-nine/Jackrabbit-startup-script/issues/2","body":"currently this script just checks for existence of a .pid file to decide whether jackrabbit is running. would be nice if it could actually check whether jackrabbit really is running.\r\nthe main problem is that start at system startup does not happen if there is a stale pid file left over from a hard shutdown or jackrabbit otherwise crashed. as you know the port, maybe a small request to see if there is tcp at that port would help. (this should be done both for 'status' and for 'start'. and in start it could additionally complain if there is no pid file but already something listening on the port, as this won't work either.","html_url":"https://github.com/sixty-nine/Jackrabbit-startup-script/issues/2","number":2,"title":"improve status check","id":2196194,"created_at":"2011-11-10T09:41:38Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/a09ab7cd49dbc05c1a634ca704bb73c7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a09ab7cd49dbc05c1a634ca704bb73c7","url":"https://api.github.com/users/sixty-nine","login":"sixty-nine","id":398679},"updated_at":"2011-11-10T09:48:51Z","url":"https://api.github.com/repos/sixty-nine/Jackrabbit-startup-script/issues/comments/2693341","body":"It's true, the usage of a PID file is not the perfect solution.\r\n\r\nBut I am not completely sure that testing the connection on the given port is the best solution to check if Jackrabbit is running. At least not if we cannot figure out a response that would be sent by Jackrabbit to uniquely identify it.\r\n\r\nOtherwise if another service is running on the Jackrabbit port, the script would \"think\" Jackrabbit is running. \r\n\r\nDo you know if there is some kind of request that we could send to jackrabbit that would generate a unique and known response?\r\n\r\nAnother solution would be to use \"ps | grep\" to check if a Jackrabbit process is running but this would only work on Unix based systems.\r\n","id":2693341,"created_at":"2011-11-10T09:48:51Z"}}