2 # Copyright 2023 Gentoo Authors
3 # Distributed under the terms of the GNU General Public License v2
5 description="dae Service"
6 pidfile="/run/${RC_SVCNAME}.pid"
8 command_args="run -c ${DAE_CONF_DIR:-/etc/dae}/config.dae"
9 command_background="yes"
11 rc_ulimit="${DAE_ULIMIT:--u 512 -n 1048576}"
12 output_log="/var/log/dae.log"
13 error_log="/var/log/dae.log"
16 after docker net net-online sysctl local
21 if [ -d /sys/fs/bpf ]; then
22 if ! mountinfo -q /sys/fs/bpf ; then
23 mount -t bpf bpffs /sys/fs/bpf
26 eerror "bpf filesystem not mounted, exiting..."
30 if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup/; then
31 eerror "cgroup filesystem not mounted, exiting..."
35 if ! /usr/bin/dae validate -c /etc/dae/config.dae; then
36 eerror "checking config file /etc/dae/config.dae failed, exiting..."
40 checkpath -d -m 0755 /run/${RC_SVCNAME}
41 checkpath -f -m 0644 "$output_log"