diff --git a/main.go b/main.go index 59472ce..7a8c654 100644 --- a/main.go +++ b/main.go @@ -140,12 +140,13 @@ func block(config sunsetConfig, command string) { nextHr, nextMin := getNextWait(config) timer := time.NewTimer((time.Duration(nextHr) * time.Hour) + (time.Duration(nextMin) * time.Minute)) <-timer.C + log.Printf("Running command: %s\n", command) go runCommand(command) } } func runCommand(command string) { - cmd := exec.Command("/usr/bin/env sh", "-c", command) + cmd := exec.Command("/usr/bin/env", "sh", "-c", command) err := cmd.Run() if err != nil { log.Printf("Command %s returned a non 0 code", command)