From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ACAD8158004 for ; Sat, 20 Jul 2024 16:59:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 247862BC03F; Sat, 20 Jul 2024 16:59:05 +0000 (UTC) Received: from puleglot.ru (puleglot.ru [IPv6:2a01:4f8:1c0c:58e8::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BF03A2BC028 for ; Sat, 20 Jul 2024 16:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tsoy.me; s=mymail; h=Sender:MIME-Version:Content-Transfer-Encoding:Content-Type: References:In-Reply-To:Date:To:From:Subject:Message-ID:Reply-To:Cc:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=adAmwV+M65kOLsLBuzl98OPWCACh65ifa10xVnPYEhI=; b=Wwz3TcJe/dAMtCWLcbxc+5QBJP 2t75YNBfpyecZEPBcq4+eMqOWfkgdqJuLanurb7+sJlujQO8tw8uLhEhaIph+iDEOkHWP7GQBNmnb 78GNbYyBOwHTfP34iNVCWKYcgzRdm7VAkbVVMSewIPjIm8TuqSI0buyKd5Oh6dlkqvqc=; Received: from [5.35.113.117] (helo=[192.168.1.244]) by puleglot.ru with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1sVDQB-00000002pkt-2Z5C for gentoo-dev@lists.gentoo.org; Sat, 20 Jul 2024 19:58:59 +0300 Message-ID: Subject: Re: [gentoo-dev] [RFC PATCH 06/19] www-servers/nginx: add nginx-r2.service From: Alexander Tsoy To: gentoo-dev@lists.gentoo.org Date: Sat, 20 Jul 2024 19:58:58 +0300 In-Reply-To: <20240717120553.31866-7-zurabid2016@gmail.com> References: <20240717120553.31866-1-zurabid2016@gmail.com> <20240717120553.31866-7-zurabid2016@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Sender: puleglot@puleglot.ru X-Archives-Salt: 3c5594cf-75c8-41dc-bc09-3ab5bda4b31c X-Archives-Hash: 26d904a0f08ba0c77dfdc5a98e025ac8 =D0=92 =D0=A1=D1=80, 17/07/2024 =D0=B2 15:05 +0300, Zurab Kvachadze =D0=BF= =D0=B8=D1=88=D0=B5=D1=82: > This is the second revision of the systemd service file for NGINX. >=20 > This commit removes redundant Exec{Stop,Reload} lines that restate > the > systemd defaults and changes the ExecStartPre directive from "nginx - > t" > (testing the NGINX configuration that is done anyway by the main > process, bug 481456) to "mkdir -p /var/tmp/nginx", making sure the > required directory for the NGINX temp files is present. ExecStopPost > has > also been removed, since sleeping for 100 ms serves no purpose. >=20 > The second revision also changes the Exec* directives to use the > plain > file names, instead of the absolute ones, per systemd.service(5) > guidelines: > > It is thus safe to use just the executable name in case of > > executables > > located in any of the "standard" directories, and an absolute path > > must be used in other cases. >=20 > Bug: https://bugs.gentoo.org/481456 > Signed-off-by: Zurab Kvachadze > --- > =C2=A0www-servers/nginx/files/nginx-r2.service | 12 ++++++++++++ > =C2=A01 file changed, 12 insertions(+) > =C2=A0create mode 100644 www-servers/nginx/files/nginx-r2.service >=20 > diff --git a/www-servers/nginx/files/nginx-r2.service b/www- > servers/nginx/files/nginx-r2.service > new file mode 100644 > index 000000000000..2916aba391a2 > --- /dev/null > +++ b/www-servers/nginx/files/nginx-r2.service > @@ -0,0 +1,12 @@ > +[Unit] > +Description=3DThe NGINX HTTP and reverse proxy server > +After=3Dnetwork.target remote-fs.target nss-lookup.target > + > +[Service] > +Type=3Dforking > +PIDFile=3D/run/nginx.pid > +ExecStartPre=3Dmkdir -p /var/tmp/nginx Please note that systemd-tmpfiles can remove the whole /var/tmp/nginx directory if it and its contents are not touched for a long time. And then reload of nginx might fail. So it is better to create this directory via tmpfiles.d. > +ExecStart=3Dnginx > + > +[Install] > +WantedBy=3Dmulti-user.target