Last active
June 27, 2020 08:52
-
-
Save phlinhng/e27eb4bb59326de152c32b9fd1450d72 to your computer and use it in GitHub Desktop.
scp ssl cert files to other servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
site="www.your-ssl.com" | |
path="/root/.acme.sh/acme-v02.api.letsencrypt.org/sites/${site}" | |
touch server.key server.crt | |
sudo cat "${path}/${site}.key" > "/root/server.key" | |
sudo cat "${path}/${site}.crt" > "/root/server.crt" | |
if [ -s "server.key" ] && [ -s "server.crt" ]; then | |
scp server* 10.170.0.12:~ | |
fi | |
rm server* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment