speaker = peripheral.find("speaker")
speakerDriver = kernel.addDriver("speaker_driver")

local function startup()
    parallel.waitForAll(speakerDriver.startup)
end

local function shutDown()
    parallel.waitForAll(speakerDriver.shutDown)
end

local function runSafe()
    startup()
end

local function run()
    local success, err = pcall(runSafe)
    if not success then
        os.reboot()
    end
end



return { run = run }
