initd

package
v0.0.0-...-8c33a01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use: "initd", Short: "添加开机启动项", Example: "sudis initd",
	RunE: func(cmd *cobra.Command, args []string) error {
		if err := isAdminUser(); err != nil {
			return err
		}

		switch runtime.GOOS {
		case "linux":
			return linuxAutoStart()
		case "windows":
			return windowsAutoStart()
		default:
			return errors.New("not support")
		}
	},
}

Functions

This section is empty.

Types

type WindowsServerConfig

type WindowsServerConfig struct {
	Id          string
	Name        string
	Description string
	WorkDir     string
	Start       string
	StartArgs   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL