summaryrefslogtreecommitdiff
path: root/cmd/commands.go
diff options
context:
space:
mode:
authorMatt Holt <mholt@users.noreply.github.com>2021-01-19 18:45:49 -0700
committerGitHub <noreply@github.com>2021-01-19 18:45:49 -0700
commit3366384d9347447632ac334ffbbe35fb18738b90 (patch)
treee58b66f8675d7d1666438373f64a2a25d26e6f5b /cmd/commands.go
parent1ac6351705e06316d261d2d1cc926ce33d6f23b4 (diff)
caddycmd: Add upgrade command (#3972)
Replaces the current Caddy executable with a new one from the build server. Honors custom builds, as long as plugins are registered on the Caddy website. Requires permissions to replace current executable, of course. This is an experimental command that may get changed or removed later.
Diffstat (limited to 'cmd/commands.go')
-rw-r--r--cmd/commands.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/commands.go b/cmd/commands.go
index e4a2b91..1765194 100644
--- a/cmd/commands.go
+++ b/cmd/commands.go
@@ -277,6 +277,15 @@ is always printed to stdout.`,
}(),
})
+ RegisterCommand(Command{
+ Name: "upgrade",
+ Func: cmdUpgrade,
+ Short: "Upgrade Caddy (EXPERIMENTAL)",
+ Long: `
+Downloads an updated Caddy binary with the same modules/plugins at the
+latest versions. EXPERIMENTAL: May be changed or removed.`,
+ })
+
}
// RegisterCommand registers the command cmd.