Skip to content

Instantly share code, notes, and snippets.

@earlgreyxxx
Last active January 27, 2023 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earlgreyxxx/c600ad9f1e84c3c72a3148ac46cc3c7d to your computer and use it in GitHub Desktop.
Save earlgreyxxx/c600ad9f1e84c3c72a3148ac46cc3c7d to your computer and use it in GitHub Desktop.
@ECHO off
REM certbot wrapper
REM sslcert <ドメイン名> [test]
REM testを指定すると、--dry-run (シミュレーション)を付けて実行します。
SETLOCAL
if "%~1"=="" (
ECHO SSL証明書を取得するドメイン名を入力してください。
GOTO END
)
if "%~2"=="test" (
SET DRYRUN=--dry-run
) else (
SET DRYRUN=
)
certbot certonly --manual -d %~1 --key-type rsa --agree-tos --manual-public-ip-logging-ok --manual-auth-hook certbot-preauth.cmd --manual-cleanup-hook certbot-postauth.cmd %DRYRUN%
:END
ENDLOCAL
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment