only run postrotate script once to avoid race condition

Change-Id: If4117f8844d22a90b0ba9eba9c481451a02353b0