1 Star 0 Fork 0

wsq-Q / BookStack

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
main.go 751 Bytes
Copy Edit Raw Blame History
TruthHun authored 2019-09-23 20:30 . 增加虚拟根目录
package main
import (
"fmt"
"os"
"github.com/TruthHun/BookStack/utils"
"github.com/TruthHun/BookStack/commands"
"github.com/TruthHun/BookStack/commands/daemon"
_ "github.com/TruthHun/BookStack/routers"
_ "github.com/go-sql-driver/mysql"
"github.com/kardianos/service"
)
func main() {
if len(os.Args) >= 3 && os.Args[1] == "service" {
if os.Args[2] == "install" {
daemon.Install()
} else if os.Args[2] == "remove" {
daemon.Uninstall()
} else if os.Args[2] == "restart" {
daemon.Restart()
}
}
commands.RegisterCommand()
d := daemon.NewDaemon()
s, err := service.New(d, d.Config())
if err != nil {
fmt.Println("Create service error => ", err)
os.Exit(1)
}
utils.PrintInfo()
utils.InitVirtualRoot()
s.Run()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/wsq-Q/BookStack.git
git@gitee.com:wsq-Q/BookStack.git
wsq-Q
BookStack
BookStack
master

Search

344bd9b3 5694891 D2dac590 5694891