@dsmwb Apologies for the delay in response.
As per the documentation you posted if onstart returns true, it will release the busy, and if it returns false, it will terminate the process.
So according to your code, is all the initialization code called in init()?
Also, when you request restart, it will try to restart the instance, but then right after you call that you return false which will try to kill it. I'm not sure this is causing your issue, but I believe the request restart should be put in the onstop method.
Hope it was helpful.
Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics