Well, a fix would be to take the cautions route of: If pidof nodm is found, that means they currently running it, so abandon all attempts to restart it.
If the user is so smart that they want to restart it, they can do it themselves. (Equivalent of them rebooting the system themselves.)