From 87fe946955dac2e607116a2b6731a137d6b82f7a Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Thu, 8 Feb 2024 15:26:18 +0200 Subject: [PATCH] systemd units: specify RuntimeDirectory The RuntimeDirectory will create /var/run/openresty folder during start of the service. --- deb/openresty/debian/openresty.service | 1 + rpm/SOURCES/openresty.service | 1 + 2 files changed, 2 insertions(+) diff --git a/deb/openresty/debian/openresty.service b/deb/openresty/debian/openresty.service index c99685162..deecdb68f 100644 --- a/deb/openresty/debian/openresty.service +++ b/deb/openresty/debian/openresty.service @@ -22,6 +22,7 @@ ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t -q -g 'daemon on; master_p ExecStart=/usr/local/openresty/nginx/sbin/nginx -g 'daemon on; master_process on;' ExecReload=/usr/local/openresty/nginx/sbin/nginx -g 'daemon on; master_process on;' -s reload ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /usr/local/openresty/nginx/logs/nginx.pid +RuntimeDirectory=openresty TimeoutStopSec=5 KillMode=mixed diff --git a/rpm/SOURCES/openresty.service b/rpm/SOURCES/openresty.service index 164602c1e..6cfd03f5b 100644 --- a/rpm/SOURCES/openresty.service +++ b/rpm/SOURCES/openresty.service @@ -10,6 +10,7 @@ ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t ExecStart=/usr/local/openresty/nginx/sbin/nginx ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID +RuntimeDirectory=openresty PrivateTmp=true [Install]