summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index d4ce13079a..d77df2d75f 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -382,7 +382,8 @@ var (
Cfg *ini.File
CustomPath string // Custom directory path
CustomConf string
- CustomPID string
+ PIDFile = "/var/run/gitea.pid"
+ WritePIDFile bool
ProdMode bool
RunUser string
IsWindows bool
@@ -535,8 +536,8 @@ func SetCustomPathAndConf(providedCustom, providedConf, providedWorkPath string)
func NewContext() {
Cfg = ini.Empty()
- if len(CustomPID) > 0 {
- createPIDFile(CustomPID)
+ if WritePIDFile && len(PIDFile) > 0 {
+ createPIDFile(PIDFile)
}
if com.IsFile(CustomConf) {