Skip to content

Commit

Permalink
Update rtsslcert
Browse files Browse the repository at this point in the history
  • Loading branch information
arakasi72 authored Jun 23, 2017
1 parent f0798b4 commit 9014d9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/rtsslcert
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ echo -n "Generating https/ssl certificates"

openssl req -x509 -nodes -days 3650 -subj /CN=$serverip -config /etc/ssl/ruweb.cnf -newkey rsa:2048 -keyout /etc/ssl/private/ruweb.key -out /etc/ssl/ruweb.crt > /dev/null 2>&1

echo ": done"

if [ -f /etc/vsftpd.conf ]; then
sed -i '/^\(\s\|#\)*rsa_private_key_file/ c\rsa_private_key_file=\/etc\/ssl\/private\/ruweb\.key' /etc/vsftpd.conf
sed -i '/^\(\s\|#\)*rsa_cert_file/ c\rsa_cert_file=\/etc\/ssl\/ruweb\.crt' /etc/vsftpd.conf
Expand All @@ -59,8 +61,6 @@ if [ -f /etc/nginx/sites-available/default ]; then
sed -i '/ssl_certificate_key/ c\ ssl_certificate_key \/etc\/ssl\/private\/ruweb\.key;' /etc/nginx/sites-available/default
service nginx restart
fi

echo ": done"
}

#check it is being run as root
Expand Down

0 comments on commit 9014d9e

Please sign in to comment.