11 lines
352 B
TypeScript
11 lines
352 B
TypeScript
// Reboot the whole computer! Careful!
|
|
export default async function reboot() {
|
|
setTimeout(async () => await Bun.$`/bin/systemd-run --uid=0 --gid=0 /sbin/reboot`, 1000)
|
|
|
|
return {
|
|
text: "Rebooting... This will take about 10 seconds.",
|
|
script: `setTimeout(() => window.location.reload(), 10000)`
|
|
}
|
|
}
|
|
|
|
export const GET = reboot |