summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2022-09-14cmd: Improve error message if config missingMatthew Holt
2022-09-13cmd: Customizable user agent (close #2795)Matthew Holt
2022-09-06cmd: Enhance some help textMatthew Holt
2022-09-01cmd: Don't print long help text on errorMatthew Holt
2022-08-30cmd: Enhance CLI docsMatthew Holt
2022-08-30cmd: add completion command (#4994)Mohammed Al Sahaf
* cmd: add completion command * error check
2022-08-30cmd: Migrate to `spf13/cobra`, remove single-dash arg support (#4565)Mohammed Al Sahaf
* cmd: migrate to spf13/cobra * add `manpage` command * limit Caddy tagline to root `help` only * hard-code the manpage section to 8
2022-08-06Replace strings.Index with strings.Cut (#4932)Chirag Maheshwari
2022-08-04Replace strings.Index usages with strings.Cut (#4930)WilczyńskiT
2022-08-04cmd: Use newly-available version information (#4931)Matt Holt
2022-08-02chore: Bump up to Go 1.19, minimum 1.18 (#4925)Francis Lavoie
2022-08-01Oops (sigh)Matthew Holt
Forgot to remove this redundant line
2022-08-01caddyhttp: Implement `caddy respond` command (#4870)Matt Holt
2022-07-29Minor docs clarificationMatthew Holt
Related to #4565
2022-07-29core: Windows service integration (#4790)WingLim
Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2022-07-28Fix compilation on WindowsMatthew Holt
2022-07-28Fix deprecation notice by using UTF16PtrFromStringMatthew Holt
2022-07-20cmd: Fix reload with stdin (#4900)Francis Lavoie
2022-06-15Add comment about xcaddy to mainMatthew Holt
2022-04-28cmd: Fix unix socket addresses for admin API requests (#4742)Francis Lavoie
Fixes a regression in c2327161f725c820826587381f37d651a2b9736d
2022-04-25httpcaddyfile: Deprecate paths in site addresses; use zap logs (#4728)Francis Lavoie
2022-04-13cmd: Enhance .env (dotenv) file parsingMatthew Holt
Basic support for quoted values, newlines in quoted values, and comments. Does not support variable or command expansion.
2022-04-12cmd: Add `--diff` option for `caddy fmt` (#4695)Francis Lavoie
2022-04-03cmd: Fix defaulting admin address if empty in config, fixes `reload` (#4674)Francis Lavoie
2022-03-19cmd: Set Origin header properly on API requestsMatthew Holt
Ref. https://caddy.community/t/bug-in-enforce-origin/15417
2022-03-02pki: Implement API endpoints for certs and `caddy trust` (#4443)Francis Lavoie
* admin: Implement /pki/certificates/<id> API * pki: Lower "skip_install_trust" log level to INFO See https://github.com/caddyserver/caddy/issues/4058#issuecomment-976132935 It's not necessary to warn about this, because this was an option explicitly configured by the user. Still useful to log, but we don't need to be so loud about it. * cmd: Export functions needed for PKI app, return API response to caller * pki: Rewrite `caddy trust` command to use new admin endpoint instead * pki: Rewrite `caddy untrust` command to support using admin endpoint * Refactor cmd and pki packages for determining admin API endpoint
2022-01-16cmd: Print error if fmt overwrite fails (fix #4524)Matthew Holt
2021-11-08caddycmd: Add `--keep-backup` to upgrade commands (#4387)Francis Lavoie
* caddycmd: Add `--skip-cleanup` to upgrade commands This is a partial fix for https://github.com/caddyserver/caddy/issues/4057, making it possible to retain the old build of Caddy, in case something went wrong. * caddycmd: Fix duplicate error message The error message "download succeeded, but unable to execute" was repeated, because it was both in the `listModules`/`showVersion` functions and in the calling `upgradeBuild` function. Oversight when this was refactored. * caddycmd: Implement fix for performing cleanup on Windows Without this, the cleanup operation would fail with an error message like this: upgrade: download succeeded, but unable to clean up backup binary: remove C:\caddy\caddy.exe.tmp: Access is denied. * caddycmd: Rename to `--keep-backup`, simplify build constraints
2021-10-18caddycmd: Add `--skip-standard` to `list-modules` command, quieter output ↵Francis Lavoie
(#4386) * caddycmd: Add --skip-standard to list-modules command, quieter output * caddycmd: Also quiet `caddy upgrade` output, redundant information
2021-10-11caddycmd: fix caddy validate/fmt help message (#4377)M. Ángel Jimeno
* caddycmd: fix caddy validate help message Fixes #4376 * caddycmd: fix caddy fmt help message
2021-09-29Move from deprecated ioutil to os and io packages (#4364)KallyDev
2021-09-01cmd: export CaddyVersion(), Commands() (#4316)peymaneh
* cmd: Export CaddyVersion() * cmd: Add getter Commands()
2021-08-20cmd: Fix paths when using an env file (#4296)Pascal Zarrad
* core: Fix paths when using an env file * refactor: move path logic to loadFromEnv
2021-08-18cmd: use net.ErrClosed for matching returned error (#4289)M. Ángel Jimeno
Implements #3805
2021-08-11cmd: New `add-package` and `remove-package` commands (#4226)Oleg
* adding package command * add-package command name * refactoring duplicate code * fixed by review * fixed by review * remove-package command * commands in different files, common utils * fix add, remove, upgrade packages in 1 file * copyright and downloadPath moved * refactor * downloadPath do no export * adding/removing multiple packages * addPackages/removePackages, comments, command-desc * add-package, process case len(args) == 0 Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2021-05-11cmd: upgrade: inherit the permissions of the original executable (#4160)Mohammed Al Sahaf
2021-05-02cmd: Add --envfile flag to `start` command (#4141)Jesse
* add envfile in start cmd * fix commandfuncs * fix commandfuncs * fix cmdStart envfile from bool to string Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2021-04-05notify: Send all sd_notify signals from main caddy process (#4060)Carl George
Initial sd_notify support was added in #3963, but that sent signals from both cmdRun and cmdReload. This approach has two drawbacks: - Reloads initiated via the API do not send signals. - The signals are sent from different processes, which requires the `NotifyAccess=exec` directive in the unit file. This change moves the NotifyReloading and NotifyReadiness invocations to Load, which address both of those drawbacks. It also adds a complimentary NotifyStopping method which is invoked from handleStop. All the notify methods are defined in a notify package to avoid an import loop.
2021-03-29cmd: Use formatted logger for config adapter warnings (#4080)Francis Lavoie
2021-03-29cmd: main: fix minor doc typos (#4082)Simão Gomes Viana
Fixed typos in the documentation
2021-02-24Update docs; commit setcap.shMatthew Holt
2021-02-22caddytls: Remove old asset migration code (close #3894)Matthew Holt
2021-02-15cmd: Clean up `build-info` and `upgrade` outputMatthew Holt
2021-02-01cmd: Add --force flag to reload command (close #4005)Matthew Holt
Can be useful if user wants to reload manual certificates, for example.
2021-01-19caddycmd: Add upgrade command (#3972)Matt Holt
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.
2021-01-19caddytest: Update Caddyfile tests for formatting, HTTP-only blocksMatthew Holt
Previous commit improved the Caddyfile adapter so it doesn't unnecessarily add names to "skip" in "auto_https" when the server is already HTTP-only. This commit updates the tests to reflect that change, while also fixing the Caddyfile formatting in many of the tests. We also print the line number of the divergence between input and formatted version in Caddyfile adapt warnings - very useful for finding initial formatting problems.
2021-01-16cmd: Print more detailed version with --environMatthew Holt
2021-01-12cmd: Implement sd_notify() to notify systemd about readiness (#3963)Stefan Tatschner
Issue: #3786 Based on Gaurav Dhameeja's work in #3908.
2021-01-04cmd: Organize list-modules output; --packages flag (#3925)Matt Holt
2021-01-04caddyfile: Introduce basic linting and fmt check (#3923)Matt Holt
* caddyfile: Introduce basic linting and fmt check This will help encourage people to keep their Caddyfiles tidy. * Remove unrelated tests I am not sure that testing the output of warnings here is quite the right idea; these tests are just for syntax and parsing success.