diff options
author | Bwko <bouwko@gmail.com> | 2017-01-14 03:15:43 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-01-14 10:15:43 +0800 |
commit | 4a1f36c3cc3d93633299a2f71826ee0198adaef0 (patch) | |
tree | 6e105c824289097e424c7e0b08ded49aea7b2acf | |
parent | 27fcf8d30a8c8dda281739c84af4033c93d96faf (diff) | |
download | gitea-4a1f36c3cc3d93633299a2f71826ee0198adaef0.tar.gz gitea-4a1f36c3cc3d93633299a2f71826ee0198adaef0.zip |
Don't create a default pid file (#637)
-rw-r--r-- | cmd/web.go | 2 | ||||
-rw-r--r-- | modules/setting/setting.go | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/cmd/web.go b/cmd/web.go index a69bcf4b20..2ab680ecf3 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -62,7 +62,7 @@ and it takes care of all the other things for you`, }, cli.StringFlag{ Name: "pid, P", - Value: "custom/run/app.pid", + Value: "/var/run/gitea.pid", Usage: "Custom pid file path", }, }, diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 275e4b58a1..523582f703 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -515,12 +515,10 @@ please consider changing to GITEA_CUSTOM`) } } - if len(CustomPID) == 0 { - CustomPID = CustomPath + "/run/app.pid" + if len(CustomPID) > 0 { + createPIDFile(CustomPID) } - createPIDFile(CustomPID) - if len(CustomConf) == 0 { CustomConf = CustomPath + "/conf/app.ini" } |