#!/bin/bash

ESTADO=`cat /etc/lock/bloqueado`

if [ "$ESTADO" == "1" ];then

    cd /etc/lock/listas
    for file in *;do
	
	while read line
	do
	    echo bloqueando "$line"
	    chattr +i -R "$line"
	done <"$file"

    done

    chattr -i -R /home/minino/.config/caja

    

elif [ "$ESTADO" == "0" ];then

    cd /etc/lock/listas
    for file in *;do

	while read line
	do
	    chattr -i -R "$line"
	done <"$file"

    done

else
    echo "Configuration not found"

fi

exit 0