X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=examples%2Fpublic-inbox-httpd%40.service;h=73731533f7eccd639476677c56adb6dc71d5e920;hb=e28f33dc1b6e6a296946c0c58b43900c6cbd07f7;hp=4efea2ad0bae51dcbabefacdaf4238374b454f61;hpb=f8d7edb01ddf5fd2bfef08f72ec3c5cfb4ffa937;p=public-inbox.git diff --git a/examples/public-inbox-httpd@.service b/examples/public-inbox-httpd@.service index 4efea2ad..73731533 100644 --- a/examples/public-inbox-httpd@.service +++ b/examples/public-inbox-httpd@.service @@ -1,9 +1,14 @@ # ==> /etc/systemd/system/public-inbox-httpd@.service <== +# Consider looking at public-inbox-netd@.service instead of this file +# to simplify management when serving multiple protocols. +# # Since SIGUSR2 upgrades do not work under systemd, this service file # allows starting two simultaneous services during upgrade time # (e.g. public-inbox-httpd@1 public-inbox-httpd@2) with the intention # that they take turns running in-between upgrades. This should # allow upgrading without downtime. +# For servers expecting visitors from multiple timezones, TZ=UTC +# is needed to ensure a consistent approxidate experience with search. [Unit] Description = public-inbox PSGI server %i @@ -13,12 +18,20 @@ After = public-inbox-httpd.socket [Service] Environment = PI_CONFIG=/home/pi/.public-inbox/config \ PATH=/usr/local/bin:/usr/bin:/bin \ +TZ=UTC \ PERL_INLINE_DIRECTORY=/tmp/.pub-inline LimitNOFILE = 30000 ExecStartPre = /bin/mkdir -p -m 1777 /tmp/.pub-inline -ExecStart = /usr/local/bin/public-inbox-httpd +ExecStart = /usr/local/bin/public-inbox-httpd \ +-1 /var/log/public-inbox/httpd.out.log +StandardError = syslog + +# NonBlocking is REQUIRED to avoid a race condition if running +# simultaneous services +NonBlocking = true Sockets = public-inbox-httpd.socket + KillSignal = SIGQUIT User = nobody Group = nogroup