mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-08 18:22:30 +01:00
testing/pounce: add install script, openrc files
The pounce initscript has been configured for creating multiple instances of pounce because a single instance of pounce can connect to only one IRC network. The calico initscript and conf.d file is needed if pounce creates UNIX domain sockets.
This commit is contained in:
parent
2ce73aa4db
commit
ad8a8335f7
@ -1,14 +1,16 @@
|
||||
# Contributor: ayushnix <ayush@ayushnix.com>
|
||||
# Contributor: TBK <alpine@jjtc.eu>
|
||||
# Maintainer: TBK <alpine@jjtc.eu>
|
||||
pkgname=pounce
|
||||
pkgver=3.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Multi-client, TLS-only IRC bouncer"
|
||||
arch="all"
|
||||
url="https://git.causal.agency/pounce/"
|
||||
license="GPL-3.0-or-later"
|
||||
options="!check" # No test suite
|
||||
makedepends="libretls-dev"
|
||||
install="$pkgname.pre-install"
|
||||
subpackages="$pkgname-doc"
|
||||
source="https://git.causal.agency/pounce/snapshot/pounce-$pkgver.tar.gz"
|
||||
|
||||
@ -21,8 +23,17 @@ build() {
|
||||
|
||||
package() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 "$srcdir"/pounce.confd "$pkgdir"/etc/conf.d/pounce
|
||||
install -Dm644 "$srcdir"/calico.confd "$pkgdir"/etc/conf.d/calico
|
||||
install -Dm755 "$srcdir"/pounce.initd "$pkgdir"/etc/init.d/pounce
|
||||
install -Dm755 "$srcdir"/calico.initd "$pkgdir"/etc/init.d/calico
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b2c2481e152368080e6ce9b3be2d7920eb4cac630dabb994e31170fb44977e2235c0ff30a7f08e826a329da69371a3ff2dae33831cb93b18655f98fc6569da7d pounce-3.1.tar.gz
|
||||
fb668102389b4d7b58ba709b19aec9ff421fd8c41311ad8dff5aa704ee657304f2e06aa3589c809d02e2d74a241ad62f1b7f37854fa496c165ccd95aa4bafd50 pounce.confd
|
||||
1bf9f4bc63689bce34b8ba15013bc7c85f883eb2ab530da65cdd5b746fef0450b0466ba4c3f7cc511acc2cf5ff0969305e9f3cf98c5c5f9688255ec9cf395690 pounce.initd
|
||||
ad1a333be7d7d4bfa9f1931b7bee35df2a860960db929fce437f0d0d73fb858f2131d622254bb5a0b288efe075e0a63abc54125ecfb0bd2a6b9c668a3a92b65f calico.confd
|
||||
9ad4d2b314e7ec33f353636cc57de0d609b472870cf500ddd6e222e458cbc3b93b221cc805df04b51ec41f80576e19c30b296671cea3eeab388af9a8ae6e5c5d calico.initd
|
||||
c4082bd08ee0124a10ddce240de62b8ef6e5ae85e939e856af7758ac43ef8edca3fd6e219823d6259848b59589f3db51de6d73735e4d5fcadf8c7be05d49a7bf pounce.pre-install
|
||||
"
|
||||
|
||||
20
testing/pounce/calico.confd
Normal file
20
testing/pounce/calico.confd
Normal file
@ -0,0 +1,20 @@
|
||||
calico_user=pounce
|
||||
calico_group=pounce
|
||||
|
||||
# the $calico_dir directory should be accessible to the $calico_user and the
|
||||
# $pounce_user in the respective pounce config file in /etc/conf.d/
|
||||
# the value of this variable should be equal to the value of the 'local-path'
|
||||
# configuration option in pounce configuration file(s)
|
||||
calico_dir=/run/pounce
|
||||
|
||||
# the '-H' argument for calico
|
||||
# the hostname on which calico will listen on
|
||||
# calico_hostname=hostname.example.org
|
||||
|
||||
# the '-P' argument for calico
|
||||
# read calico(1) for more details
|
||||
# calico_port=
|
||||
|
||||
# the '-t' argument for calico
|
||||
# read calico(1) for more details
|
||||
# calico_timeout=
|
||||
21
testing/pounce/calico.initd
Normal file
21
testing/pounce/calico.initd
Normal file
@ -0,0 +1,21 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
: "${calico_user:=pounce}"
|
||||
: "${calico_group:=pounce}"
|
||||
: "${calico_hostname:=localhost}"
|
||||
: "${calico_dir:=/run/$calico_user}"
|
||||
|
||||
name="calico"
|
||||
description="dispatch incoming TLS connections to pounce by SNI"
|
||||
command=/usr/bin/calico
|
||||
command_args="-H $calico_hostname $calico_dir"
|
||||
[ -n "$calico_port" ] && command_args="$command_args -P $calico_port"
|
||||
[ -n "$calico_timeout" ] && command_args="$command_args -t $calico_timeout"
|
||||
command_background=true
|
||||
command_user="${calico_user}:${calico_group}"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
use dns
|
||||
}
|
||||
11
testing/pounce/pounce.confd
Normal file
11
testing/pounce/pounce.confd
Normal file
@ -0,0 +1,11 @@
|
||||
pounce_user=pounce
|
||||
pounce_group=pounce
|
||||
pounce_verbose=true
|
||||
|
||||
# specify the location of the configuration file for an IRC network
|
||||
# pounce_config="/var/lib/pounce/.config/pounce/libera.conf"
|
||||
|
||||
# if an initscript called pounce.libera is symlinked to the pounce initscript,
|
||||
# the default log file will be /var/log/pounce.libera.log
|
||||
# output_log=/var/log/pounce.log"
|
||||
# error_log=/var/log/pounce.log"
|
||||
41
testing/pounce/pounce.initd
Normal file
41
testing/pounce/pounce.initd
Normal file
@ -0,0 +1,41 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="A multi-client, TLS-only IRC bouncer"
|
||||
|
||||
: "${pounce_user:=pounce}"
|
||||
: "${pounce_group:=pounce}"
|
||||
: "${pounce_verbose:=false}"
|
||||
: "${output_log:=/var/log/${RC_SVCNAME}.log}"
|
||||
: "${error_log:=/var/log/${RC_SVCNAME}.log}"
|
||||
|
||||
instance_name="${RC_SVCNAME#*.}"
|
||||
[ "$instance_name" != "pounce" ] \
|
||||
&& name="pounce ($instance_name)" \
|
||||
|| name="pounce"
|
||||
|
||||
command=/usr/bin/pounce
|
||||
command_background="true"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_user="${pounce_user}:${pounce_group}"
|
||||
|
||||
if yesno "${pounce_verbose}"; then
|
||||
command_args="-v $pounce_config"
|
||||
else
|
||||
commmand_args="$pounce_config"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
use dns
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
[ -n "$output_log" ] && checkpath -q -f -m 0640 \
|
||||
-o "$command_user" "$output_log"
|
||||
|
||||
[ -n "$error_log" ] && checkpath -q -f -m 0640 \
|
||||
-o "$command_user" "$error_log"
|
||||
|
||||
[ -n "$pounce_config" ] && checkpath -q -f -m 0640 \
|
||||
-o "$command_user" "$pounce_config"
|
||||
}
|
||||
5
testing/pounce/pounce.pre-install
Normal file
5
testing/pounce/pounce.pre-install
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S pounce 2> /dev/null
|
||||
adduser -S -D -H -h /var/lib/pounce -s /sbin/nologin -G pounce -g 'pounce irc bouncer' pounce 2> /dev/null
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user