From 1992fe12995ca0bdc2027db0ea3b19cf3248dcfe Mon Sep 17 00:00:00 2001 From: Ramon Fischer Date: Sun, 3 Nov 2019 03:55:01 +0100 Subject: [PATCH 1/4] rename socket file, make example more precise, use long parameter name --- contrib/systemd/gitea.service | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service index b5aa6ffcb5cab..70b33114f8a72 100644 --- a/contrib/systemd/gitea.service +++ b/contrib/systemd/gitea.service @@ -16,13 +16,13 @@ After=network.target # If using socket activation for main http/s ### # -#After=gitea.main.socket -#Requires=gitea.main.socket +#After=gitea.socket +#Requires=gitea.socket # ### # (You can also provide gitea an http fallback and/or ssh socket too) # -# An example of /etc/systemd/system/gitea.main.socket +# An example of /etc/systemd/system/gitea.socket ### ## ## [Unit] @@ -30,7 +30,7 @@ After=network.target ## PartOf=gitea.service ## ## [Socket] -## ListenStream= +## ListenStream= ## NoDelay=true ## ## [Install] @@ -53,7 +53,7 @@ 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 +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 want to bind Gitea to a port below 1024, uncomment From 2d55f2c87a87a590008d6d99120a92a14a02e1b3 Mon Sep 17 00:00:00 2001 From: Ramon Fischer Date: Sun, 3 Nov 2019 05:01:43 +0100 Subject: [PATCH 2/4] correct path --- contrib/systemd/gitea.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service index 70b33114f8a72..fc5834043f5be 100644 --- a/contrib/systemd/gitea.service +++ b/contrib/systemd/gitea.service @@ -53,7 +53,7 @@ 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 --config /etc/gitea/app.ini +ExecStart=/usr/local/bin/gitea web --config /etc/gitea/conf/app.ini Restart=always Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea # If you want to bind Gitea to a port below 1024, uncomment From c0d8f8148bb4da171c28715d7510cf8eb62e2e9a Mon Sep 17 00:00:00 2001 From: Ramon Fischer Date: Sun, 3 Nov 2019 15:50:22 +0100 Subject: [PATCH 3/4] use the correct path to the configuration file according to the documentation --- contrib/systemd/gitea.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service index fc5834043f5be..70b33114f8a72 100644 --- a/contrib/systemd/gitea.service +++ b/contrib/systemd/gitea.service @@ -53,7 +53,7 @@ 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 --config /etc/gitea/conf/app.ini +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 want to bind Gitea to a port below 1024, uncomment From 71b40f58ceeb49c6ee4e3dddb8180bed51f7a7a1 Mon Sep 17 00:00:00 2001 From: Ramon Fischer Date: Sun, 3 Nov 2019 21:09:27 +0100 Subject: [PATCH 4/4] rename the socket unit back to 'gitea.main.socket', explicitly indicate that the socket unit should use the service file 'gitea.service' --- contrib/systemd/gitea.service | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service index 70b33114f8a72..a69588893b29a 100644 --- a/contrib/systemd/gitea.service +++ b/contrib/systemd/gitea.service @@ -16,13 +16,13 @@ After=network.target # If using socket activation for main http/s ### # -#After=gitea.socket -#Requires=gitea.socket +#After=gitea.main.socket +#Requires=gitea.main.socket # ### # (You can also provide gitea an http fallback and/or ssh socket too) # -# An example of /etc/systemd/system/gitea.socket +# An example of /etc/systemd/system/gitea.main.socket ### ## ## [Unit] @@ -30,6 +30,7 @@ After=network.target ## PartOf=gitea.service ## ## [Socket] +## Service=gitea.service ## ListenStream= ## NoDelay=true ##