authelia/cmd/authelia-scripts/cmd_serve.go
Clement Michaud b4a8c4f0ec Introduce version command to Authelia to check the version
The version command displays the tag and the commit hash of the
built commit along with the time when the build was done.
2019-12-09 13:03:12 +01:00

18 lines
489 B
Go

package main
import (
"os"
"github.com/clems4ever/authelia/internal/utils"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
// ServeCmd serve authelia with the provided configuration
func ServeCmd(cobraCmd *cobra.Command, args []string) {
log.Infof("Running Authelia with config %s...", args[0])
cmd := utils.CommandWithStdout(OutputDir+"/authelia", "--config", args[0])
cmd.Env = append(os.Environ(), "PUBLIC_DIR=dist/public_html")
utils.RunCommandUntilCtrlC(cmd)
}