Created
August 11, 2010 12:49
-
-
Save carlosjac/518921 to your computer and use it in GitHub Desktop.
Create digital certificate.sh
This file contains hidden or 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 | |
# | |
# Create digital certificates for a virtual domain on Ubuntu 10.04 (Slicehost) | |
# Execute as root | |
# | |
# Author : Carlos Jacobs | |
# Date : 11 Aug 2010 | |
echo Please, enter domain | |
read DOMAIN | |
sudo mkdir /tmp/cert | |
sudo cd /tmp/cert | |
sudo openssl req -new -nodes -keyout $DOMAIN.key -out $DOMAIN.csr | |
sudo openssl x509 -req -days 3650 -in $DOMAIN.csr -signkey $DOMAIN.key -out $DOMAIN.crt | |
sudo cp $DOMAIN.crt /etc/ssl/certs/ | |
sudo cp $DOMAIN.key /etc/ssl/private/ | |
sudo rm * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment