From bc5a479fefa77ee54a9fddecdbbb7e7991f22da1 Mon Sep 17 00:00:00 2001 From: Thomas McWork Date: Sun, 6 Oct 2019 20:32:23 +0200 Subject: [PATCH] Add unix socket help (#8377) When using unix socket as listener (`HTTP_ADDR = /run/gitea/gitea.socket`) then it's required to have the folder `/run/gitea` with appropriate owner/group. Manual creation leads to vanishing after reboot. This directive enables Systemd to handle this. --- contrib/systemd/gitea.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service index d88df4a0371..b7e6629ebfe 100644 --- a/contrib/systemd/gitea.service +++ b/contrib/systemd/gitea.service @@ -20,6 +20,9 @@ Type=simple User=git Group=git WorkingDirectory=/var/lib/gitea/ +# If using unix socket: Tells Systemd to create /run/gitea folder to home gitea.sock +# Manual cration would vanish after reboot. +#RuntimeDirectory=gitea ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini Restart=always Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea