cd /usr/local/velocity
isODroid=$(bash src/github.com/atlonaeng/studio/deploy/isODroid)
if [[ "$isODroid" == "y" ]]; then
    echo "Dropping mongo db on ARM64 for AMS"
    sudo chmod +x src/github.com/atlonaeng/studio/deploy/factoryReset/factoryResetARM64
    src/github.com/atlonaeng/studio/deploy/factoryReset/factoryResetARM64
    ret=$?
    if [[ "$ret" -eq 0 ]]; then
        whoami=$(whoami)
        if [[ "$whoami" == "root" ]]; then
            service studio restart
        else
            sudo service studio restart
        fi
    else
        echo "Factory reset failed with non zero return value"
    fi
    echo "Drop database on Atlona Device is complete."
else
    echo "use mongo shell and drop db"
fi
