phogue / Potato

Procon 2 is a (long promised and often postponed) second release of the Procon admin tool for gameservers. Once released, it will allow managing several games and automating tasks via plugins.
https://myrcon.com/
Apache License 2.0
20 stars 4 forks source link

Configs should write out to temporary file #43

Closed phogue closed 10 years ago

phogue commented 10 years ago

Configs should first write to a temp file, then delete the original config file and rename the temp file. This adds a buffer between losing config settings from locked config files.

The config should have "tmp.1" with the numbers incrementing on failure, but if the original config was successful then all .tmp.* files should be removed.

Before loading a config, the highest tmp.* file name should replace the original file name

phogue commented 10 years ago

Closing. I can't see a purpose of this now. Maintaining a fail history for configuration options seems like a potentially buggy process instead of hosts maintaining backups or allowing the user to edit/copy their configs themselves.

Whatever we implemented would require a lot of testing and only potentially introduce bugs for the edge case problem.