Rewrite battery daemon