Split server.cfg into -defaults and -overrides

    Joined
    May 26, 2014
    Messages
    37
    Reaction score
    26
    • Legacy Citizen 5
    • Purchased!
    • Community Content - Bronze 1
    Instead of having a single server.cfg file that is a mix of installation-time defaults and manual overrides, a practice I've seen really help with config management is to split the 2 purposes into distinct files.

    server-defaults.cfg

    This file is overwritten at every upgrade/installation. It is not designed to be modified locally and acts as the default value list and as a template/documentation file for server operators to base their customizations upon.

    server-overrides.cfg

    This file is initially blank. Any value declared here will override the value in -defaults. To return a server to vanilla, simply clear out this file. To share a custom server configuration, share this file.

    Another benefit here is that sharing -overrides is relatively forwards/backwards compatible and you don't need to worry about merging any changes with the vanilla config file.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    I would suggest splitting into shared + custom data folders.

    Then we don't need files with different names, just go to the proper location.
     
    • Like
    Reactions: NoK0mm3nt
    Joined
    May 26, 2014
    Messages
    37
    Reaction score
    26
    • Legacy Citizen 5
    • Purchased!
    • Community Content - Bronze 1
    That would also work well and mirrors a lot of modding systems too.