mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 04:37:17 +08:00
26 lines
309 B
Go
26 lines
309 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"runtime/debug"
|
|
_ "time/tzdata"
|
|
)
|
|
|
|
func main() {
|
|
if os.Geteuid() != 0 {
|
|
panic("panel must run as root")
|
|
}
|
|
|
|
debug.SetGCPercent(10)
|
|
debug.SetMemoryLimit(128 << 20)
|
|
|
|
web, err := initWeb()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
if err = web.Run(); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|