Wrap in a transaction for clean restarts
Shutdown log daemon cleanly went sent a SIGTERM. Fixes #135