gorcon / rcon-cli

RCON client for executing queries on game server.
MIT License
495 stars 45 forks source link

Feature Request: Modify rcon.yaml Reading Method #45

Open patrick-csliu opened 9 months ago

patrick-csliu commented 9 months ago

In Linux, I would like to place rcon in /usr/local/bin and call it as a comand, but it throws an error when the rcon.yaml file is missing in the current directory.

Here is my suggestion: allow rcon.yaml to be optional if not found. When searching for rcon.yaml, I recommend that it first searches the current folder. If not found, it should then search the user's home folder. If still not found, it should proceed to search the /etc folder. If not found in any of these locations, the rcon.yaml file can be skipped.

samvv commented 2 months ago

rcon could follow the classic structure defined by freedesktop.org: $XDG_HOME_DIR and $HOME/.config if it does not exist, e.g. $HOME/.config/rcon-cli/rcon.yaml

Many applications use the same file structure for their configuration files.