mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
net-im/eturnal: add 1.12.2, drop 1.12.0-r1
If you wondered why epmd was stopped after you stopped Eturnal, this is now fixed by setting ERL_DIST_PORT during the build! This commit also comes with a new revision of the OpenRC init service: * Use supervise-daemon instead of s-s-d. * Add startup command logging. * Don't ping with superuser privileges. Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
DIST eturnal-1.12.0.tar.gz 919050 BLAKE2B 76c7f0709f82231cff47609e234e2555d68f86df8efa6117351cea8e632b91d023bf22542953a083b0172f9b55f0b1a24dd4abee94cbfde8b86ff4e76b233b82 SHA512 b990fd010d26dc29ab69124dd6db354ab018c1b8882ef7f82631c06234b79027ba838a746d6c606a9f6678feffb6bcaa2b879270c3abe407ef509a5f50367774
|
||||
DIST eturnal-1.12.1.tar.gz 965160 BLAKE2B 7a908b52beda6a9acda92fec21ff5583e8bbd657b47ebac23ed1f589e576f19708a4c17261a1500b88a3d6f0f5a2c9163713485e83848639c6cc635f60e941cc SHA512 ffd8e9376944babd4a3afade3cc0421ad146f8ec24e04f0b59964e3f1d6f8b05951e7d59bab5ac940e5b9e818450346cad1f42c9c0d30b76ec4c5e1590c885eb
|
||||
DIST eturnal-1.12.2.tar.gz 964784 BLAKE2B 087735ce0d0f90298c4042ae0515c4204b87fee04939ef8d813304736609cea8da6f94391c3f18ecf819605560c473667100aa2b73e556d7e7a72e165131ec82 SHA512 a121834b6461c30214aba95576bb2baec7bdd2e1c9cd7061ec16e21d3c2ff55c24f07b35eb1138d40a57185c8bceef7a4868c60c4875fccd6e6ee5833f19ad22
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2024 Gentoo Authors
|
||||
# Copyright 2024-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -18,7 +18,7 @@ KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="
|
||||
acct-user/eturnal
|
||||
>=dev-lang/erlang-21:=[ssl]
|
||||
>=dev-lang/erlang-23.1:=[ssl]
|
||||
dev-libs/libyaml
|
||||
dev-libs/openssl:=
|
||||
>=dev-erlang/conf-0.1
|
||||
@@ -38,7 +38,7 @@ src_configure() {
|
||||
export ETURNAL_USER=eturnal
|
||||
export ETURNAL_PREFIX="${EPREFIX}"/opt/eturnal
|
||||
export ETURNAL_ETC_DIR="${EPREFIX}"/etc
|
||||
export ERL_EPMD_ADDRESS=""
|
||||
export ERL_DIST_PORT=3470
|
||||
export CODE_LOADING=dynamic
|
||||
|
||||
export SKIP_DEPS=true
|
||||
@@ -50,7 +50,7 @@ rebar3_install_release() {
|
||||
cp -pR bin lib releases "${ED}"/opt/eturnal/ || die
|
||||
|
||||
systemd_dounit etc/systemd/system/eturnal.service
|
||||
newinitd "${FILESDIR}"/eturnal.initd eturnal
|
||||
newinitd "${FILESDIR}"/eturnal.initd-r1 eturnal
|
||||
newconfd etc/openrc/eturnal.confd eturnal
|
||||
|
||||
insinto /etc
|
||||
47
net-im/eturnal/files/eturnal.initd-r1
Normal file
47
net-im/eturnal/files/eturnal.initd-r1
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/sbin/openrc-run
|
||||
# shellcheck shell=sh
|
||||
#
|
||||
# Copyright 2024-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
extra_started_commands="reload"
|
||||
description_reload="Reload eturnal's configuration"
|
||||
|
||||
supervisor="supervise-daemon"
|
||||
description="STUN/TURN server"
|
||||
command="/usr/sbin/eturnalctl"
|
||||
command_args_foreground="foreground"
|
||||
command_args_background="daemon"
|
||||
command_user="eturnal:turnserver"
|
||||
pidfile="/run/eturnal.pid"
|
||||
capabilities="^cap_net_bind_service"
|
||||
healthcheck_delay=300
|
||||
healthcheck_timer=60
|
||||
output_log="/opt/eturnal/log/eturnal.log"
|
||||
error_log="${output_log}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
want epmd
|
||||
use firewall
|
||||
}
|
||||
|
||||
healthcheck() {
|
||||
su -g turnserver -s /bin/sh eturnal -c "'${command}' ping" >/dev/null
|
||||
}
|
||||
|
||||
start_post() {
|
||||
local i=10
|
||||
while [ $((i = i - 1)) -gt 0 ]; do
|
||||
healthcheck && return 0
|
||||
sleep 1
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ${RC_SVCNAME}"
|
||||
"${command}" reload
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user