check

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CheckCmd = cli.Command{
	Name:   "check",
	Usage:  "Check if uptime is above a limit.",
	Action: check,
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:   "uptime-limit",
			Usage:  "Limit above a file will be created. In time.Duration format.",
			EnvVar: "UC_UPTIME_LIMIT",
			Value:  "24h",
		},
		cli.StringFlag{
			Name:   "file",
			Usage:  "Path of the file to create.",
			EnvVar: "UC_FILE_PATH",
			Value:  "/var/run/reboot-required",
		},
		cli.StringFlag{
			Name:   "interval",
			Usage:  "Interval between 2 checks. In time.Duration format.",
			EnvVar: "UC_INTERVAL",
			Value:  "5m",
		},
		cli.StringFlag{
			Name:   "window-start-time",
			Usage:  "Window start hour and minute.",
			EnvVar: "UC_WINDOW_START",
			Value:  "00:00",
		},
		cli.StringFlag{
			Name:   "window-end-time",
			Usage:  "Window end hour and minute.",
			EnvVar: "UC_WINDOW_END",
			Value:  "23:59",
		},
	},
}

CheckCmd start an infinite loop and check uptime every interval.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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