// Reboot the whole computer! Careful!
export default async function reboot() {
    setTimeout(async () => await Bun.$`/bin/systemctl start nose-reboot.service`, 1000)

    return {
        text: "Rebooting... This will take about 20 seconds.",
        script: `setTimeout(() => window.location.reload(), 20000)`
    }
}

export const GET = reboot