X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=examples%2Fpublic-inbox-httpd%40.service;h=147f7c6dd9d709a5353dac4cb469086ebc35caad;hb=21fcd8a37c82c1ef654d402cf592f0c9d803aa26;hp=6222de59153a91eed14507239da4e0342229228b;hpb=37bf2db81bbbe114d7fc5a00e30d3d5a6fa74de5;p=public-inbox.git diff --git a/examples/public-inbox-httpd@.service b/examples/public-inbox-httpd@.service index 6222de59..147f7c6d 100644 --- a/examples/public-inbox-httpd@.service +++ b/examples/public-inbox-httpd@.service @@ -4,6 +4,8 @@ # (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,17 +15,25 @@ 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 ExecReload = /bin/kill -HUP $MAINPID -TimeoutStopSec = 3600 +TimeoutStopSec = 86400 KillMode = process [Install]