2019-10-30 03:54:47 +07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-11-02 21:32:58 +07:00
|
|
|
log "github.com/sirupsen/logrus"
|
2019-10-30 03:54:47 +07:00
|
|
|
"github.com/spf13/cobra"
|
2020-04-05 19:37:21 +07:00
|
|
|
|
2021-08-11 08:04:35 +07:00
|
|
|
"github.com/authelia/authelia/v4/internal/utils"
|
2019-10-30 03:54:47 +07:00
|
|
|
)
|
|
|
|
|
2020-05-02 12:06:39 +07:00
|
|
|
// ServeCmd serve Authelia with the provided configuration.
|
2021-08-11 08:04:35 +07:00
|
|
|
func ServeCmd(cmd *cobra.Command, args []string) {
|
2019-11-02 21:32:58 +07:00
|
|
|
log.Infof("Running Authelia with config %s...", args[0])
|
2021-08-11 08:04:35 +07:00
|
|
|
execCmd := utils.CommandWithStdout(OutputDir+"/authelia", "--config", args[0])
|
|
|
|
utils.RunCommandUntilCtrlC(execCmd)
|
2019-10-30 03:54:47 +07:00
|
|
|
}
|