Detecting first start of server in OnServerStart?

I am aware of the serverDetails.serverIsNew property available inside the preServerStart interceptor, as well as the installDetails.initialInstall that’s available in the onServerInstall interceptor, but is there a way to detect the first time a server is being fired up in OnServerStart?

I have some logic there and need to detect if it’s the first start of the server. What’s the best way to go about doing that?



Write a text file when the server starts up and check for the existence and validity of it?

Can you put in a ticket to include the serverdetails and installDetails in the onServerStart interceptor?

Also, for what it’s worth, the isServerNew flag will only be true once, but initialInstall will be true every time a new update comes out and your server downloads a new war. Same server, but a new engine install.



  1. Thanks Brad. COMMANDBOX-719 opened. Sounds like isServerNew is the one I was looking for.–Joel