1. 修改注册探针的服务端地址为手动填写
2. 优化 Linux 系统服务模板 3. 优化首页流量展示方式
This commit is contained in:
1 parent
31619096b8
commit
d40fc1314f
10 files changed
+336
-238
No files matched your search
@@ -111,7 +111,8 @@ type ServiceManager struct {
|
||||
const systemdScript = `[Unit]
|
||||
Description={{.Description}}
|
||||
ConditionFileIsExecutable={{.Path|cmdEscape}}
|
||||
{{range .Dependencies}} {{.}} {{end}}
|
||||
{{range $i, $dep := .Dependencies}}
|
||||
{{$dep}} {{end}}
|
||||
|
||||
[Service]
|
||||
StartLimitInterval=5
|
||||
@@ -122,14 +123,20 @@ ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmd}}{{end}}
|
||||
{{if .UserName}}User={{.UserName}}{{end}}
|
||||
{{if .ReloadSignal}}ExecReload=/bin/kill -{{.ReloadSignal}} "$MAINPID"{{end}}
|
||||
{{if .PIDFile}}PIDFile={{.PIDFile|cmd}}{{end}}
|
||||
{{if .LogOutput}}StandardOutput={{.LogOutput}}
|
||||
StandardError={{.LogOutput}}{{end}}
|
||||
{{if .LogDirectory}}LogsDirectory={{.LogDirectory}}{{end}}
|
||||
Restart=always
|
||||
{{if and .LogOutput .HasOutputFileSupport -}}
|
||||
StandardOutput=file:{{.LogDirectory}}/{{.Name}}.out
|
||||
StandardError=file:{{.LogDirectory}}/{{.Name}}.err
|
||||
{{- end}}
|
||||
{{if gt .LimitNOFILE -1 }}LimitNOFILE={{.LimitNOFILE}}{{end}}
|
||||
{{if .Restart}}Restart={{.Restart}}{{end}}
|
||||
{{if .SuccessExitStatus}}SuccessExitStatus={{.SuccessExitStatus}}{{end}}
|
||||
RestartSec=5
|
||||
KillMode=process
|
||||
EnvironmentFile=-/etc/sysconfig/{{.Name}}
|
||||
|
||||
{{range $k, $v := .EnvVars -}}
|
||||
Environment={{$k}}={{$v}}
|
||||
{{end -}}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
`
|
||||
|
||||
Reference in new issue
Block a user