42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
295 stars 60 forks source link

Added a default value for the '-conf' flag #240

Closed rmzg closed 5 years ago

rmzg commented 5 years ago

By default matterircd doesn't attempt to read any config file, now it will attempt to read from /usr/local/etc/matterircd/matterircd.toml if it exists.

rmzg commented 5 years ago

Now with actually working code!

42wim commented 5 years ago

hi rmzg, thanks for your contribution. This is a good idea, but I think changing the default to "matterircd.toml" is better than "/usr/local/etc/matterircd/matterircd.toml"

If you could make this change I can merge it, thanks!

rmzg commented 5 years ago

Changing it is fine but I'm confused, what directory it would look for that file in? I picked the /usr/local.. one out of the documentation for creating a config file.

42wim commented 5 years ago

It will look in the current directory, so if you're starting matterircd while being in /home/user it'll look for /home/user/matterircd.toml

If you want to run it as a service you can always explicitly mention -conf /usr/local/etc/matterircd/matterircd.toml

Most users don't have access to write in /usr/local/etc/matterircd

rmzg commented 5 years ago

That's a good point, I've always run matterircd from a docker image, maybe -conf /usr/local/etc... should be added to that as a default option?

rmzg commented 5 years ago

Updated.

42wim commented 5 years ago

Thanks! Regarding to the docker question: with the -v option of docker you can mount the matterircd.toml where you want