保存本机管理命令与关闭旧重置路由检查点

This commit is contained in:
xuans committed 2026-09-21 01:12:17 +08:00
1 parent 55c56b518f
commit 325928ee1f
18 files changed
+1242 -32

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
package main
import (
"context"
"fmt"
"os"
"os/signal"
"syscall"
"git.pcux.cn/xuans/Scert/backend/internal/adminconsole"
)
func main() {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
if err := adminconsole.Run(ctx, os.Args[1:]); err != nil {
fmt.Fprintln(os.Stderr, "Scert-admin:", err)
os.Exit(1)
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ func writeSessionInfo(writer io.Writer, session admin.Session) {
fmt.Fprintln(writer, "请使用 root 或 Scert 用户读取该文件;密码重置完成后文件会自动销毁。")
fmt.Fprintln(writer, "停止 Scert-admin 后入口将立即关闭;异常退出时入口会在租约过期后自动关闭。")
}
func main() {
func legacyMain() {
baseDir := flag.String("base-dir", "", "Windows 默认安装根目录")
configPath := flag.String("config", "", "配置文件路径")
codeOutput := flag.String("code-output", "", "一次性校验码文件路径")