Is there a command to detect if tnt explodes?

Solution 1:

You can test for any primed TNT in your world, and if it succeeds, set a redstone block to a nearby location which is next to another command block:

Rpt: /testfor @e[type=tnt]
Cnd: /setblock 12 23 34 redstone_block