I think you may need to match the order in post_receive - activate local first, then do children (if any). The gear will already be disabled/stopped (via gear stop in jenkins_shell_command), and if you only have 2 gears total, doing the children first will result in a situation where both the local-gear and the child gear are stopped at the same time.