Skip to content

Commit

Permalink
Suggest to use Type=simple for systemd service (go-gitea#28717)
Browse files Browse the repository at this point in the history
Although the systemd notify support was added, it seems that there are
some problems (go-gitea#28553, for the "non-installed" instance)
  • Loading branch information
wxiaoguang authored and silverwind committed Feb 20, 2024
1 parent 3819c9a commit 19b8181
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions contrib/systemd/gitea.service
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ After=network.target
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
# LimitNOFILE=524288:524288
RestartSec=2s
Type=notify
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
Expand All @@ -62,7 +62,6 @@ WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
WatchdogSec=30s
# If you install Git to directory prefix other than default PATH (which happens
# for example if you install other versions of Git side-to-side with
# distribution version), uncomment below line and add that prefix to PATH
Expand Down
3 changes: 3 additions & 0 deletions modules/graceful/manager_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import (
"time"
)

// FIXME: it seems that there is a bug when using systemd Type=notify: the "Install Page" (INSTALL_LOCK=false) doesn't notify properly.
// At the moment, no idea whether it also affects Windows Service, or whether it's a regression bug. It needs to be investigated later.

type systemdNotifyMsg string

const (
Expand Down

0 comments on commit 19b8181

Please sign in to comment.