But that is not risk-free. What if the thing that's overwriting the file on startup dislikes not being able to write to the file and crashes?
By the way, my solution would fail if the overwriting is happening after startup.
signature.asc
Description: OpenPGP digital signature