mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Enable watchtower to update itself
This commit is contained in:
parent
1f460997cb
commit
3dd06cffb1
7 changed files with 254 additions and 35 deletions
5
main.go
5
main.go
|
@ -20,6 +20,7 @@ func main() {
|
|||
app := cli.NewApp()
|
||||
app.Name = "watchtower"
|
||||
app.Usage = "Automatically update running Docker containers"
|
||||
app.Before = before
|
||||
app.Action = start
|
||||
app.Flags = []cli.Flag{
|
||||
cli.IntFlag{
|
||||
|
@ -46,6 +47,10 @@ func handleSignals() {
|
|||
}()
|
||||
}
|
||||
|
||||
func before(c *cli.Context) error {
|
||||
return updater.CheckPrereqs()
|
||||
}
|
||||
|
||||
func start(c *cli.Context) {
|
||||
secs := time.Duration(c.Int("interval")) * time.Second
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue