2021-11-09 11:37:51 +00:00
|
|
|
//go:build !windows && !darwin && !linux
|
2018-05-01 23:45:06 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-07-08 14:49:19 +00:00
|
|
|
"fmt"
|
2018-05-01 23:45:06 +00:00
|
|
|
"os"
|
|
|
|
|
2020-08-05 10:49:53 +00:00
|
|
|
cli "github.com/urfave/cli/v2"
|
2018-05-01 23:45:06 +00:00
|
|
|
)
|
|
|
|
|
2021-02-19 22:06:57 +00:00
|
|
|
func runApp(app *cli.App, graceShutdownC chan struct{}) {
|
2024-07-08 14:49:19 +00:00
|
|
|
app.Commands = append(app.Commands, &cli.Command{
|
|
|
|
Name: "service",
|
|
|
|
Usage: "Manages the cloudflared system service (not supported on this operating system)",
|
|
|
|
Subcommands: []*cli.Command{
|
|
|
|
{
|
|
|
|
Name: "install",
|
|
|
|
Usage: "Install cloudflared as a system service (not supported on this operating system)",
|
|
|
|
Action: cliutil.ConfiguredAction(installGenericService),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "uninstall",
|
|
|
|
Usage: "Uninstall the cloudflared service (not supported on this operating system)",
|
|
|
|
Action: cliutil.ConfiguredAction(uninstallGenericService),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
2018-05-01 23:45:06 +00:00
|
|
|
app.Run(os.Args)
|
|
|
|
}
|
2024-07-08 14:49:19 +00:00
|
|
|
|
|
|
|
func installGenericService(c *cli.Context) error {
|
|
|
|
return fmt.Errorf("service installation is not supported on this operating system")
|
|
|
|
}
|
|
|
|
|
|
|
|
func uninstallGenericService(c *cli.Context) error {
|
|
|
|
return fmt.Errorf("service uninstallation is not supported on this operating system")
|
|
|
|
}
|