X-Original-To: alpine-aports@lists.alpinelinux.org Received: from cock.li (cock.li [185.100.85.212]) by lists.alpinelinux.org (Postfix) with ESMTP id 1028D5C652C for ; Thu, 25 Oct 2018 15:15:22 +0000 (GMT) Date: Thu, 25 Oct 2018 15:15:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firemail.cc; s=mail; t=1540480520; bh=Kcfnss136l/LxAp3NmA1zokZ8xvMqLRt2V5jhTbdOyE=; h=Date:To:Subject:From:From; b=mmw2UZRNlT9qjbsus+IrUfoYUN5E+tVsyci4zqcTLgmH+tFyDPgNPIzyIS6jn/2lt 5I19HDvgcQp33bvT0gn6UMWTr+h67qba1UeLiVDx4an3iY6aKG56YC0hdmRzLvpWPv pI3YaLcBP88vwNakYdXa5cetv7s4zSs1iBVn1DP02CCgtuVHmzrzjZT9J/w9EK8qIy MDqoMZgPoWzIETuKNc4S3TFAQ4D9nYcWMNVFErS3tUTFBsjhbhTt0/uA0UUGbG1Nzz gcvAoolTDeXi6ftrsWWYFeqSZCMQrvpd4+FCA9Jj5xxdKbZm6HQzdk4+NcMwpggU9O LxxzWp/HtjhEw== To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH] main/darkhttpd: Fix multiple instances support From: Milliardo Peacecraft Message-Id: X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 5fd553eceec8325f829089d13e5828e002393438 was supposed to allow multiple instances, but given that it defines `procname`, SIGTERM gets delivered to all running instances. Instead, don't daemonize darkhttpd and let start-stop-daemon(8) handle process forking and pidfile creation. This was chosen over using `--pidfile` flag of darkhttpd because pidfile is created inside the chroot in such case. Signed-off-by: Milliardo Peacecraft --- main/darkhttpd/darkhttpd.initd | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main/darkhttpd/darkhttpd.initd b/main/darkhttpd/darkhttpd.init= d index b16244b25c..38d33f3a69 100644 --- a/main/darkhttpd/darkhttpd.initd +++ b/main/darkhttpd/darkhttpd.initd @@ -2,10 +2,9 @@ =20 description=3D"darkhttpd web server" command=3D"/usr/bin/darkhttpd" -command_args=3D"${document_root:-/var/www/localhost/htdocs} --chroot --dae= mon --uid darkhttpd --gid www-data $darkhttpd_args" -procname=3D"darkhttpd" -pidfile=3D"" -stopsig=3D"SIGTERM" +command_args=3D"${document_root:-/var/www/localhost/htdocs} --chroot --uid= darkhttpd --gid www-data $darkhttpd_args" +command_background=3D"true" +pidfile=3D"/run/$SVCNAME.pid" start_stop_daemon_args=3D"-q" =20 optional_arg() { --=20 2.19.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---