|
@@ -982,6 +982,10 @@ instalarVirtualHost() {
|
|
|
# Copiamos ficheros de configuración
|
|
|
cp -f $virtualHostFile "/etc/$webServerName/sites-available/$virtualHostName" >> $logFile 2>&1
|
|
|
comprobarError $? 910
|
|
|
+ if [ -f "/etc/$webServerName/sites-enabled/$virtualHostName" ];then
|
|
|
+ rm -f /etc/$webServerName/sites-enabled/$virtualHostName 2>/dev/null
|
|
|
+ comprobarError 911 $virtualHostName
|
|
|
+ fi
|
|
|
ln -s "/etc/$webServerName/sites-available/$virtualHostName" "/etc/$webServerName/sites-enabled/$virtualHostName" >> $logFile 2>&1
|
|
|
comprobarError $? 911 $virtualHostName
|
|
|
recargarServicio $webServerName
|