summaryrefslogtreecommitdiff
path: root/shell.go
diff options
context:
space:
mode:
Diffstat (limited to 'shell.go')
-rw-r--r--shell.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell.go b/shell.go
index efa1794..037787a 100644
--- a/shell.go
+++ b/shell.go
@@ -115,3 +115,10 @@ func Run(cmdline string) int {
log.Println("END ", cmdline)
return 0
}
+
+func Daemon(cmdline string, timeout time.Duration) int {
+ for {
+ Run(cmdline)
+ time.Sleep(timeout)
+ }
+}