Refactor: Rename NanoKVM to BatchuKVM and update server URL

This commit is contained in:
2025-12-09 20:35:38 +09:00
commit 8cf674c9e5
396 changed files with 54380 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
package vm
import (
"NanoKVM-Server/proto"
"os/exec"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
)
func (s *Service) Reboot(c *gin.Context) {
var rsp proto.Response
log.Println("reboot system...")
err := exec.Command("reboot").Run()
if err != nil {
rsp.ErrRsp(c, -1, "operation failed")
log.Errorf("failed to reboot: %s", err)
return
}
rsp.OkRsp(c)
log.Debug("system rebooted")
}