Moved the function that detect if pacemaker is started into the service pacemaker.