Add some requesters

This commit is contained in:
2025-11-22 22:57:54 +08:00
parent 19ff49c917
commit e219e04a48
5704 changed files with 408479 additions and 111 deletions

View File

@@ -1 +1,31 @@
package core
import (
"log"
"os"
"os/signal"
"syscall"
"github.com/OmniX-Space/MeowBox-Core/internal/handler"
"github.com/OmniX-Space/MeowBox-Core/internal/service"
)
func Start() {
Stop()
log.Printf("[Info] Starting MeowBox Core...\r\n")
config, err := service.GetConfig()
if err != nil {
log.Fatalf("[Error] Failed to load config: %v", err)
}
handler.CheckInstall(config)
}
func Stop() {
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
go func() {
sig := <-sigCh
log.Printf("[Info] Received signal: %vstopping...\r\n", sig)
os.Exit(0)
}()
}