only call shell_exec if enabled

please review @karlitschek @DeepDiver1975 @k3a