Run extension within roon?

Is there a way to have my extension start when roon starts and exit when it closes?