feat: add autostart feature

This commit is contained in:
Guoguo
2025-11-25 16:36:40 +08:00
parent 0e30a26db4
commit 53924dc8ef
8 changed files with 348 additions and 1 deletions

View File

@@ -63,5 +63,10 @@ func vmRouter(r *gin.Engine) {
api.POST("/vm/tls", service.SetTls) // enable/disable TLS
api.GET("/vm/autostart", service.GetAutostart) // get autostart list
api.GET("/vm/autostart/:name", service.GetAutostartContent) // get autostart content
api.DELETE("/vm/autostart/:name", service.DeleteAutostart) // delete autostart script
api.POST("/vm/autostart/:name", service.UploadAutostart) // upload autostart script
api.POST("/vm/system/reboot", service.Reboot) // reboot system
}