mqttim

MQTT ↔ Instant Messaging Bridge
git clone https://git.instinctive.eu/mqttim.git
Log | Files | Refs | README | LICENSE

commit 1ea5f0a384611191c918df8ad7366d4a41139cbd
parent de16fb10471909bcd473e752b5cc6a5b126cdb1f
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Sat,  5 Apr 2025 18:52:11 +0000

Configuration filename is corrected
Diffstat:
Mmain.go | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/main.go b/main.go @@ -88,7 +88,7 @@ func readConfig(path string) Config { }, } - f, err := os.Open("mqttim.toml") + f, err := os.Open(path) if err != nil { log.Fatal(err) } @@ -124,7 +124,11 @@ func main() { cmdQueue := make(chan command, 10) ircQueue := make(chan Msg, 10) - config := readConfig("mqttim.toml") + config_file := "mqttim.toml" + if len(os.Args) > 1 { + config_file = os.Args[1] + } + config := readConfig(config_file) if len(config.Log.SqlDriver) > 0 { db, err := sql.Open(config.Log.SqlDriver, config.Log.SqlConnection)