From 9014d9ef10c731237449344b1a3d5a3e793b6d64 Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Fri, 23 Jun 2017 22:24:46 +0100 Subject: [PATCH] Update rtsslcert --- scripts/rtsslcert | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rtsslcert b/scripts/rtsslcert index 7b030b22..63130591 100755 --- a/scripts/rtsslcert +++ b/scripts/rtsslcert @@ -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 @@ -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