Skip to content

Instantly share code, notes, and snippets.

@jdgregson
Created October 26, 2024 03:46
Show Gist options
  • Save jdgregson/c64103ea2f652fc5ee28781a3b40b5d2 to your computer and use it in GitHub Desktop.
Save jdgregson/c64103ea2f652fc5ee28781a3b40b5d2 to your computer and use it in GitHub Desktop.
#!/bin/sh
HOST=myhost.example.com
certbot certonly --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual -d "$HOST"
/opt/kasm/bin/stop
cd "/etc/letsencrypt/archive/$HOST"
cp "$(ls | grep fullchain | tail -n 1)" /opt/kasm/current/certs/kasm_nginx.crt
cp "$(ls | grep privkey | tail -n 1)" /opt/kasm/current/certs/kasm_nginx.key
/opt/kasm/bin/start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment