automarker: Add restart detection

Signed-off-by: Michael Buesch <m@bues.ch>