Skip to content

change default pid location from /var/run/gitea.pid to /run/gitea.pid #12391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ and it takes care of all the other things for you`,
},
cli.StringFlag{
Name: "pid, P",
Value: "/var/run/gitea.pid",
Value: "/run/gitea.pid",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we moved this value out in to a var then this could be made compile/link time settable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Value: "/run/gitea.pid",

Usage: "Custom pid file path",
},
},
Expand Down
2 changes: 1 addition & 1 deletion contrib/init/debian/gitea
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
DESC="Gitea - Git with a cup of tea"
NAME=gitea
SERVICEVERBOSE=yes
PIDFILE=/var/run/$NAME.pid
PIDFILE=/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
WORKINGDIR=/var/lib/$NAME
DAEMON=/usr/local/bin/$NAME
Expand Down
2 changes: 1 addition & 1 deletion contrib/init/gentoo/gitea
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ start_stop_daemon_args="--user ${USER} --chdir ${DIR}"
command="/usr/local/bin/gitea"
command_args="web -c /etc/gitea/app.ini"
command_background=yes
pidfile=/var/run/gitea.pid
pidfile=/run/gitea.pid

depend()
{
Expand Down
2 changes: 1 addition & 1 deletion contrib/init/suse/gitea
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ case "$1" in

# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
# 1 - service dead, but /run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running (unused)
# 4 - service status unknown :-(
Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/usage/command-line.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Starts the server:
- Examples:
- `gitea web`
- `gitea web --port 80`
- `gitea web --config /etc/gitea.ini --pid /var/run/gitea.pid`
- `gitea web --config /etc/gitea.ini --pid /some/custom/gitea.pid`
- Notes:
- Gitea should not be run as root. To bind to a port below 1024, you can use setcap on
Linux: `sudo setcap 'cap_net_bind_service=+ep' /path/to/gitea`. This will need to be
Expand Down