Currently, I am running the GraphHopper with the server option from a bash script to detect if the cache is not valid, and recreate the cache if not valid.
It does work well if the cache is not valid, but if it is valid the GraphHopper instance will start normally in server mode and never return.
In bash script you can run a program in background but then its difficult to determine if the program is running correctly or if its still just starting (https://stackoverflow.com/questions/33548151/check-running-status-of-a-background-process-launched-from-same-bash-script).
So wonder if there is an easy way I haven’t thought about to check only the validity of the cache?
I explore the possibility of creating a new main which would create a GraphHopper instance with the same GraphHopperConfig instance that is used when running the server then call public boolean GraphHopper::load(String graphHopperFolder).
But I am not sure how to create easily GraphHopperConfig using the DropWizard framework which seems to do some magic to gather all the parameters from config file and JVM arguments.
Thanks in advance for your help!