diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-01-21 00:58:41 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-01-21 01:07:50 +0800 |
commit | ca61b00c103262137c9f2b827499a9fcf44731ed (patch) | |
tree | 331900b44200efb90c9b8474c3c044aa9b89a638 /tools/cru-py/cru/service/_external.py | |
parent | b92ef60a14a7c7bbc6449cd2d89c47da9324368e (diff) | |
download | crupest-ca61b00c103262137c9f2b827499a9fcf44731ed.tar.gz crupest-ca61b00c103262137c9f2b827499a9fcf44731ed.tar.bz2 crupest-ca61b00c103262137c9f2b827499a9fcf44731ed.zip |
feat(manage): default to test in certbot. add update-blog command.
Diffstat (limited to 'tools/cru-py/cru/service/_external.py')
-rw-r--r-- | tools/cru-py/cru/service/_external.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/cru-py/cru/service/_external.py b/tools/cru-py/cru/service/_external.py index 418316a..2347e95 100644 --- a/tools/cru-py/cru/service/_external.py +++ b/tools/cru-py/cru/service/_external.py @@ -21,7 +21,10 @@ class CliToolCommandProvider(AppCommandFeatureProvider): "-t", "--test", action="store_true", help="run certbot in test mode" ) _install_docker_parser = subparsers.add_parser( - "install-docker", help="print docker commands" + "install-docker", help="print docker installation commands" + ) + _update_blog_parser = subparsers.add_parser( + "update-blog", help="print blog update command" ) def _print_install_docker_commands(self) -> None: @@ -62,8 +65,17 @@ sudo usermod -aG docker $USER """.strip() print(output) + def _print_update_blog_command(self): + output = """ +### COMMAND: update blog +docker exec -it blog /scripts/update.bash +""".strip() + print(output) + def run_command(self, args): if args.gen_cli_command == "certbot": self.app.get_feature(NginxManager).print_all_certbot_commands(args.test) elif args.gen_cli_command == "install-docker": self._print_install_docker_commands() + elif args.gen_cli_command == "update-blog": + self._print_update_blog_command()
\ No newline at end of file |