Bash check if file exists on startup
===

Hey guys i was trying to run a BASH script on a debian machine. The script should check on every startup (so i put the .sh file in /etc/init.d) if the mac address i previously copied in a hidden .mac.txt file matches with the actual mac address of the machine OR if the .mac.txt file exists. If one of the two conditions is not true than the machine should shutdown. Here is what i wrote:

        #!/bin/bash
    output="'cay /root/.mac.txt'";
    mac="'/sbin/ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5'"
    if ["$mac" = "$output" ] || [ -f /root/.mac.txt]
    then
    echo "Server will start"
    else
    shutdown -h now
    fi

**If the mac address is incorrect the machine shuts down but if i remove the .mac.txt file it doesn't. Am i making some logic or syntax error?**

