Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id B2C99780FF4 for <~alpine/aports@lists.alpinelinux.org>; Thu, 7 Jul 2022 04:22:05 +0000 (UTC) Authentication-Results: purelymail.com; auth=pass DKIM-Signature: a=rsa-sha256; b=K0L9I2gBuYtokZkVcTd6fS0NP2igs8ehZUzXhoqbhKF1iGUknYz3oYHXS4boSypksr8ERZoHNGblke0ihNTM04tc4sf4L6L6ztSOjoHkuq+qmJ1RMjnrNG0gXknwJwue4qau18H+F4HcIki/NeBqcDue95yXC47kWdUywtQRpsiHcRscZYOpzuRlslGfWlWKSXfruDO5Xkv9n2yI0rrmj8i/4R1dHDejEEGcifW/8su4WPRa0n1LhmpJUfUt34O+r8YMuWqzmqKk3XAm9U0p4TBuJdlYMuyo0/fanf4znzahX9fvVvY6iOrz56W1iwE0EJVNqA/z2CFs0tkB+V8vWg==; s=purelymail2; d=tjf.sh; v=1; bh=H9gO00DDjusBQUIycSvHWvlvlcXcBOaTMstL3fF78ws=; h=Received:From:To; DKIM-Signature: a=rsa-sha256; b=Jr6uJM+TGc0j+osgJq3eTvEMFmCAOBVsjBZgBehmz7NJBMJwBBelyaxTg9ZZ7kpvtH2RSDXac58eTlibsMTxaXXye+yd3Cpis7zsP3KvTY6vah9FhqIvvDaYflKfKXU2EKzwX1DHxA2v5l2V9R0QnJchWDOhs1RFkBmtcTaO9cGtexyqSh055Whp+PwTi1UqNAt1c/lq8PN8ePbNwYXTTGKk0SgRHqzRFm+zYWCLw2+FThhwioAop9Eqaqm3y9Cx8kitHoxx4jmpFTUfdilgO7nGuOTxaQEgQZZzIbR6oa5DV2FAh7xBAJIH0HJir/qKxDHgzY/2O4Vpny4YpwHegg==; s=purelymail2; d=purelymail.com; v=1; bh=H9gO00DDjusBQUIycSvHWvlvlcXcBOaTMstL3fF78ws=; h=Feedback-ID:Received:From:To; Feedback-ID: 3419:981:null:purelymail X-Pm-Original-To: ~alpine/aports@lists.alpinelinux.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1065355513; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 07 Jul 2022 04:21:55 +0000 (UTC) From: Thomas Faughnan To: ~alpine/aports@lists.alpinelinux.org Cc: Thomas Faughnan Subject: [PATCH] testing/pounce: add init.d, conf.d, pre-install files Date: Thu, 7 Jul 2022 00:21:05 -0400 Message-Id: <20220707042105.8893-1-tom@tjf.sh> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset=ANSI_X3.4-1968 This provides OpenRC service files to run pounce as a supervised process, as well as a pre-install script which creates the pounce user and group. Accordingly, these files are added to the APKBUILD. --- testing/pounce/APKBUILD | 8 +++++++- testing/pounce/pounce.confd | 5 +++++ testing/pounce/pounce.initd | 33 +++++++++++++++++++++++++++++++ testing/pounce/pounce.pre-install | 6 ++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 testing/pounce/pounce.confd create mode 100644 testing/pounce/pounce.initd create mode 100644 testing/pounce/pounce.pre-install diff --git a/testing/pounce/APKBUILD b/testing/pounce/APKBUILD index 1c0b95a2cb..8e660a559b 100644 --- a/testing/pounce/APKBUILD +++ b/testing/pounce/APKBUILD @@ -10,7 +10,9 @@ license=3D"GPL-3.0-or-later" options=3D"!check" # No test suite makedepends=3D"libretls-dev" subpackages=3D"$pkgname-doc" -source=3D"https://git.causal.agency/pounce/snapshot/pounce-$pkgver.tar.gz" +source=3D"https://git.causal.agency/pounce/snapshot/pounce-$pkgver.tar.gz +=09$pkgname.initd +=09$pkgname.confd" =20 build() { =09./configure \ @@ -21,8 +23,12 @@ build() { =20 package() { =09make DESTDIR=3D"$pkgdir" install +=09install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname +=09install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname } =20 sha512sums=3D" 76fce4820c877202720505a96d45394027d88f9755fe9a96fb69e305699022d61f8dba7db5= 24b0bc5058b5f999bcd02b82904525d3284b34a29ffbe64c1c3bc0 pounce-3.0.tar.gz +4e848c12dac518485c07156540d7d6eba02d0c08de74803a7db26cbfd5fc175f61f2c7ad81= d805d4e803c1eb3608efcf008f32fbbf8093e1d7f9b540133e20d9 pounce.initd +4ed4026fb00425461f295f2e8eafe324072c828d03049feddeb8640693b9613ad17c79292c= 584433a12ba02fe852173abe26a4fc12cd0250f4ff4c893aa734ef pounce.confd " diff --git a/testing/pounce/pounce.confd b/testing/pounce/pounce.confd new file mode 100644 index 0000000000..b82123b2b0 --- /dev/null +++ b/testing/pounce/pounce.confd @@ -0,0 +1,5 @@ +# Configuration for /etc/init.d/pounce + +#supervisor=3D"supervise-daemon" +#cfgfile=3D"/etc/pounce/pounce.conf" +#error_log=3D"/var/log/pounce.log" diff --git a/testing/pounce/pounce.initd b/testing/pounce/pounce.initd new file mode 100644 index 0000000000..6d8cb9b923 --- /dev/null +++ b/testing/pounce/pounce.initd @@ -0,0 +1,33 @@ +#!/sbin/openrc-run + +name=3D"pounce" +description=3D"Multi-client, TLS-only IRC bouncer" + +supervisor=3D${supervisor:-"supervise-daemon"} +cfgfile=3D${cfgfile:-"/etc/$RC_SVCNAME.conf"} +error_log=3D${error_log:-"/var/log/$RC_SVCNAME.log"} + +command=3D"/usr/bin/pounce" +command_user=3D"pounce" +command_args=3D"$cfgfile" +directory=3D"/var/lib/$RC_SVCNAME" + +extra_started_commands=3D"reload" +description_reload=3D"Reload TLS configuration" + +depend() { +=09need net +=09after firewall +} + +start_pre() { +=09checkpath -d -o $command_user "$directory" +=09checkpath -f -o $command_user "$cfgfile" +=09checkpath -f -o $command_user "$error_log" +} + +reload() { +=09ebegin "Reloading TLS configuration" +=09$supervisor $RC_SVCNAME --signal USR1 +=09eend $? +} diff --git a/testing/pounce/pounce.pre-install b/testing/pounce/pounce.pre-= install new file mode 100644 index 0000000000..ddeb3674fc --- /dev/null +++ b/testing/pounce/pounce.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S pounce 2>/dev/null +adduser -S -D -h /var/lib/pounce -s /sbin/nologin -G pounce -g pounce poun= ce 2>/dev/null + +exit 0 --=20 2.36.1