From 6d8a07ea37ed989d1b3ef4983241ef80eb5b7ae3 Mon Sep 17 00:00:00 2001 From: arakasi72 Date: Mon, 20 Oct 2014 16:34:17 +0100 Subject: [PATCH] Update rtinst.sh --- rtinst.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtinst.sh b/rtinst.sh index e0c8d7f..e514ab9 100644 --- a/rtinst.sh +++ b/rtinst.sh @@ -14,6 +14,7 @@ gotip=0 install_rt=0 sshport='' rudevflag=1 +passfile='/etc/nginx/.htpasswd' #exit on error function error_exit() { @@ -540,7 +541,9 @@ fi echo "Installing nginx" | tee -a $logfile WEBPASS=$(genpasswd) -htpasswd -c -b /var/www/rutorrent/.htpasswd $user $WEBPASS >> $logfile 2>&1 +htpasswd -c -b $passfile $user $WEBPASS >> $logfile 2>&1 +chown www-data:www-data $passfile +chmod 640 $passfile openssl req -x509 -nodes -days 3650 -subj /CN=$SERVERIP -newkey rsa:2048 -keyout /etc/ssl/ruweb.key -out /etc/ssl/ruweb.crt >> $logfile 2>&1