瀏覽代碼

Añadido instalarPHPInfo()

Guzmán Castanedo Villalba 5 年之前
父節點
當前提交
6eeedfa3c3
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      install

+ 14 - 0
install

@@ -51,6 +51,10 @@ comprobarError() {
 		105)
 			error="\n$type $codeNum:\tError interno (instalación Nginx).\n"
 			;;
+		106)
+			type="WARNING"
+			error="\n$type $codeNum:\tImposible instalar 'info.php'.\n"
+			;;
 		200)
 			error="$type $codeNum:\tError interno (selección de base de datos).\n"
 			;;
@@ -587,6 +591,16 @@ instalarPHP() {
 	fi
 }
 
+instalarPHPInfo() {
+	infoFile="./confs/www/info.php"
+	if [ ! -f $infoFile ];then
+		comprobarError 1 106
+	fi
+	cp $infoFile /var/www/html/ 2>/dev/null
+	comprobarError $? 106
+	unset infoFile
+}
+
 habilitarServicio() {
 	# Arrancamos y habilitamos el servicio (con SystemD, Upstart o SystemV)
 	# Intentamos con systemctl (SystemD)