Files
fabolous005 95954b2d6b Prepare for publication: license, disclaimer, limitations, kernel 7.3.7, polkit action rename
- 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.
2026-12-04 09:13:45 +01:00

23 lines
949 B
Bash

#!/bin/sh
# Usage (as root, normally through pkexec): socket-activate-ctl {start|stop} NAME
# Starts or stops the OpenRC service socket-activate.NAME. stop leaves it running while the
# service it started is still serving a client (for EAC: a game that is still running).
set -eu
action=${1:-}
name=${2:-}
case $action in start|stop) ;; *) echo "usage: socket-activate-ctl {start|stop} NAME" >&2; exit 2 ;; esac
case $name in ''|*[!A-Za-z0-9_.-]*) echo "socket-activate-ctl: invalid name '$name'" >&2; exit 2 ;; esac
svc=socket-activate.$name
[ -e "/etc/init.d/$svc" ] || { echo "socket-activate-ctl: $svc does not exist" >&2; exit 1; }
if [ "$action" = start ]; then
exec rc-service -N "$svc" start
fi
socket_command=
. "/etc/conf.d/$svc"
if [ -n "$socket_command" ] && pgrep -xf -- "$socket_command" >/dev/null; then
echo "socket-activate-ctl: ${socket_command%% *} still runs, $svc stays started" >&2
exit 0
fi
exec rc-service -s "$svc" stop