frigate/uptime-go/uptime/ping/ip_ping.go

11 lines
167 B
Go

package ping
import "os/exec"
func IPPing(host string) bool {
var cmd = exec.Command("ping", "-w", "3", "-c", "1", host)
var err = cmd.Run()
return err == nil
}