From eab583714283fdcdac20bc61f000c76b87bbda35 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 25 Oct 2020 04:13:59 +0700 Subject: [PATCH] systemd service: Add commented PATH environment option for Git prefix (#13170) On some setups, Git is installed to directory prefix other than default PATH (such as /opt/git/bin). For Gitea to know such Git installations, PATH environment must be specified on service file. Signed-off-by: Bagas Sanjaya Co-authored-by: Lauris BH Co-authored-by: Lunny Xiao Co-authored-by: techknowlogick --- contrib/systemd/gitea.service | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service index 73e838c23..ac6a13ec5 100644 --- a/contrib/systemd/gitea.service +++ b/contrib/systemd/gitea.service @@ -57,6 +57,12 @@ 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 +# 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 +# Don't forget to place git-lfs binary on the PATH below if you want to enable +# Git LFS support +#Environment=PATH=/path/to/git/bin:/bin:/sbin:/usr/bin:/usr/sbin # If you want to bind Gitea to a port below 1024, uncomment # the two values below, or use socket activation to pass Gitea its ports as above ###