Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientCommand = &cli.Command{ Name: "client", Usage: "NodeISP Management Client", Commands: ClientCommands, }
View Source
var ClientCommands = []*cli.Command{ { Name: "status", Usage: "Get the current status of the NodeISP server", Action: client.StatusCmd, }, { Name: "version", Usage: "Get the current version and check for updates", Action: client.VersionCmd, }, { Name: "update", Usage: "Update the NodeISP server", Action: client.UpdateCmd, }, { Name: "restart", Usage: "Restart the NodeISP server", Commands: []*cli.Command{ { Name: "all", Usage: "Restart all services", Action: client.RestartAllCmd, }, { Name: "service", Usage: "Restart a specific service", ArgsUsage: "<service>", Action: client.RestartServiceCmd, }, }, }, }
View Source
var ConfigFlag = &cli.StringFlag{ Name: "config", Aliases: []string{"c"}, Usage: "Load configuration from `FILE`", Sources: cli.EnvVars("NODEISP_CONFIG"), Value: "/etc/node-isp/config.yaml", Destination: &config.File, }
View Source
var RootCommand = &cli.Command{ Name: "node-isp", Usage: "Building blocks for your own ISP", Version: version.Version, Flags: []cli.Flag{ ConfigFlag, }, Commands: append([]*cli.Command{ SetupCommand, ServerCommand, }, ClientCommands...), }
View Source
var ServerCommand = &cli.Command{ Name: "server", Usage: "NodeISP Server", Action: func(ctx context.Context, cmd *cli.Command) error { _, err := os.Stat(config.File) if os.IsNotExist(err) { c := SetupCommand c.Flags = append(c.Flags, ConfigFlag) return SetupCommand.Run(ctx, os.Args) } return server.Run() }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.