//@ts-check import * as fs from 'fs' import { init } from './initd.js' import * as reboot from './reboot.js' import { fHook } from './hook.js' function panic() { console.log("/!\\ INIT PANIK /!\\ LOSE CHIBRE") while(1) {} } async function main() { try { console.clear() await init() //chainload into sheebr if(fs.existsSync("/usr/bin/sheebr.js")) { await fHook("/usr/bin/sheebr.js") } else { console.log('wrong shell path') } reboot.disableCtrlAltSupr() reboot.powerOff() console.log("End of init reached") reboot.enableCtrlAltSupr() panic() } catch(e) { console.log(e) panic() } } main()