Skip to content

Bloated main.cfg if servers have to be restarted #3

@Ch0wW

Description

@Ch0wW

For some servermakers requiring to restart their servers every XXX days (to prevent some unpredicted behaviour), their main.cfg file will result in a bloated file that'll keep on growing with each restart.

In addition to this, said file will have their last line unproperly returned, resulting in making self-made CVAR .admin-irc unreadable. For instance, here's mine:

sets .server-location "France"
seta rconPassword "RCONPASSWORD"
seta sv_hostname "MyServerName"
seta df_sv_script_idleCfg "mixed_1/main.cfg"
seta g_log "mixed_1/mixed_1.log"
map st1sets .admin-irc "" // <<<<<<<<<<<<<<<<<<<<<<<  NOK
sets .admin-discord ""
sets .admin-mail "Ch0wW@baseq.fr"
sets .admin-name "Ch0wW"
sets .homepage "https://baseq.fr"
sets .mapbase ""
sets .server-location "France"
seta rconPassword "RCONPASSWORD"
seta sv_hostname "MyServerName"
seta df_sv_script_idleCfg "mixed_1/main.cfg"
seta g_log "mixed_1/mixed_1.log"
map st1sets .admin-irc "" // <<<<<<<<<<<<<<<<<<<<<<< NOK
sets .admin-discord ""
sets .admin-mail "Ch0wW@baseq.fr"
sets .admin-name "Ch0wW"
sets .homepage "https://baseq.fr"
sets .mapbase ""
sets .server-location "France"
seta rconPassword ""RCONPASSWORD""
seta sv_hostname "MyServerName"
seta df_sv_script_idleCfg "mixed_1/main.cfg"
seta g_log "mixed_1/mixed_1.log"
map st1sets .admin-irc "" // <<<<<<<<<<<<<<<<<<<<<<< NOK
sets .admin-discord ""
sets .admin-mail "Ch0wW@baseq.fr"
sets .admin-name "Ch0wW"
sets .homepage "https://baseq.fr"
sets .mapbase ""
sets .server-location "France"
seta rconPassword "RCONPASSWORD"
seta sv_hostname "MyServerName"
seta df_sv_script_idleCfg "mixed_1/main.cfg"
seta g_log "mixed_1/mixed_1.log"
map st1sets .admin-irc "" // <<<<<<<<<<<<<<<<<<<<<<< NOK
sets .admin-discord ""
sets .admin-mail "Ch0wW@baseq.fr"
sets .admin-name "Ch0wW"
sets .homepage "https://baseq.fr"
sets .mapbase ""
sets .server-location "France"
seta rconPassword "RCONPASSWORD"
seta sv_hostname "MyServerName"
seta df_sv_script_idleCfg "mixed_1/main.cfg"
seta g_log "mixed_1/mixed_1.log"
map st1 // <<<<<<<<<<<<<<<<<<<<<<< IS OK

A temporary(?) solution in start.sh would be to simply add this line in its beginning to delete its previous content, and thus would solve both CVAR and disk space issue :

printf "" > defrag/$NAME_ID/main.cfg 2>&1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions