Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ergo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package main

import (
"bufio"
_ "embed"
"fmt"
"log"
"os"
Expand All @@ -26,6 +27,9 @@ import (
var commit = "" // git hash
var version = "" // tagged version

//go:embed default.yaml
var defaultConfig string

// get a password from stdin from the user
func getPasswordFromTerminal() string {
bytePassword, err := term.ReadPassword(int(syscall.Stdin))
Expand Down Expand Up @@ -94,6 +98,7 @@ Usage:
ergo importdb <database.json> [--conf <filename>] [--quiet]
ergo genpasswd [--conf <filename>] [--quiet]
ergo mkcerts [--conf <filename>] [--quiet]
ergo defaultconfig
ergo run [--conf <filename>] [--quiet] [--smoke]
ergo -h | --help
ergo --version
Expand Down Expand Up @@ -173,6 +178,8 @@ Options:
if err != nil {
log.Fatal("Error while importing db:", err.Error())
}
} else if arguments["defaultconfig"].(bool) {
fmt.Print(defaultConfig)
} else if arguments["run"].(bool) {
if !arguments["--quiet"].(bool) {
logman.Info("server", fmt.Sprintf("%s starting", irc.Ver))
Expand Down