mirror of https://github.com/jetkvm/kvm.git
feat: add JSONRPC event for reboot notification
This commit is contained in:
parent
80ae3f7fb3
commit
53556cb64c
|
|
@ -175,6 +175,10 @@ func rpcGetDeviceID() (string, error) {
|
|||
func rpcReboot(force bool) error {
|
||||
logger.Info().Msg("Got reboot request from JSONRPC, rebooting...")
|
||||
|
||||
writeJSONRPCEvent("willReboot", nil, currentSession)
|
||||
|
||||
// Wait for the JSONRPCEvent to be sent
|
||||
time.Sleep(1 * time.Second)
|
||||
nativeInstance.SwitchToScreenIfDifferent("rebooting_screen")
|
||||
|
||||
args := []string{}
|
||||
|
|
|
|||
Loading…
Reference in New Issue