- LICENSE: ebuilds GPL-2.0-only (LICENSE.GPL-2), everything else MIT. - README: unofficial/no-affiliation and account-risk disclaimer; requirements and limitations (NVIDIA/ZFS/r8125 EAC modules not packaged, keys, ESP, one tested machine). - AGENTS.md: the values table is the author's example machine. - progress: CachyOS's key is on Epic's trusted list (was wrong). - overlay: kernel 7.3.7_p2 with module cleanup, compat -r3 (polkit action de.root64.engler-labs.eac-openrc-compat), pkgcheck fixes.
35 lines
1.2 KiB
Bash
35 lines
1.2 KiB
Bash
#!/bin/sh
|
|
# Usage: eac-run COMMAND [ARGS...]
|
|
# Runs COMMAND (a game launcher) with what Easy Anti-Cheat needs on OpenRC, and only for as long
|
|
# as it runs: systemd-run-agent for the user, and the socket-activate.easyanticheat_eos listener,
|
|
# started through pkexec (no password for the active local session, see the polkit action).
|
|
[ $# -gt 0 ] || { echo "usage: eac-run COMMAND [ARGS...]" >&2; exit 2; }
|
|
|
|
lib=/usr/libexec/eac-openrc-compat
|
|
name=easyanticheat_eos
|
|
svc=socket-activate.$name
|
|
|
|
running() { rc-service "$svc" status >/dev/null 2>&1; }
|
|
at_boot() { rc-update show default 2>/dev/null | grep -qwF "$svc"; }
|
|
|
|
"$lib/systemd-run-agent" 2>/dev/null &
|
|
agent=$!
|
|
|
|
was_running=
|
|
running && was_running=1
|
|
# Before EAC's first install the binary is missing; its setup then starts the listener itself.
|
|
if [ -z "$was_running" ] && [ -x /usr/local/bin/easyanticheat_eos ]; then
|
|
pkexec "$lib/socket-activate-ctl" start "$name" >/dev/null || echo "eac-run: could not start $svc" >&2
|
|
fi
|
|
|
|
cleanup() {
|
|
if [ -z "$was_running" ] && running && ! at_boot; then
|
|
pkexec "$lib/socket-activate-ctl" stop "$name" >/dev/null
|
|
fi
|
|
kill "$agent" 2>/dev/null
|
|
}
|
|
trap cleanup EXIT
|
|
trap 'exit 130' INT TERM HUP
|
|
|
|
"$@"
|