in commands/service.go [165:213]
func GetInstallFlags() []cli.Flag {
installFlags := GetFlags()
installFlags = append(
installFlags,
cli.StringFlag{
Name: "working-directory, d",
Value: homedir.New().GetWDOrEmpty(),
Usage: "Specify custom root directory where all data are stored",
},
cli.StringFlag{
Name: "config, c",
Value: GetDefaultConfigFile(),
Usage: "Specify custom config file",
},
cli.BoolFlag{
Name: "syslog",
Usage: "Setup system logging integration",
},
)
if runtime.GOOS == osTypeWindows {
installFlags = append(
installFlags,
cli.StringFlag{
Name: "user, u",
Value: "",
Usage: "Specify user-name to secure the runner",
},
cli.StringFlag{
Name: "password, p",
Value: "",
Usage: "Specify user password to install service (required)",
})
} else if os.Getuid() == 0 {
installFlags = append(installFlags,
cli.StringFlag{
Name: "user, u",
Value: "",
Usage: "Specify user-name to secure the runner",
},
cli.StringFlag{
Name: "init-user, i",
Value: "",
Usage: "Specify user-name to secure the runner in the init script or systemd unit file",
})
}
return installFlags
}