Explorar el Código

Opciones en bajaUsuario

Guzmán Castanedo Villalba hace 6 años
padre
commit
e1524e7104
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      userspanel.sh

+ 8 - 1
userspanel.sh

@@ -180,6 +180,13 @@ function bajaUsuario {
 		return 1
 	fi
 	#Faltan AQUI las Opciones
+	opciones=""
+	if [ $force = true ]; then
+		opciones=$opciones" -f"
+	fi
+	if [ $remove = true ]; then
+		opciones=$opciones" -r"
+	fi
 	printf "(QUIERES ELIMINAR A $User? [Y/N])> "
 	read correcto
 	case $correcto in
@@ -191,7 +198,7 @@ function bajaUsuario {
 			return 1
 			;;
 	esac
-	userdel $User
+	userdel$opciones $User
 	return 0
 }