2 # Copyright 2023 Gentoo Authors
3 # Distributed under the terms of the GNU General Public License v2
6 description="daed Service"
7 command="/usr/bin/daed"
9 pidfile="/run/${RC_SVCNAME}.pid"
10 command_background="yes"
11 output_log="/var/log/daed/access.log"
12 error_log="/var/log/daed/error.log"
13 supervisor="supervise-daemon"
15 rc_cgroup_cleanup="yes"
18 after docker net net-online sysctl
28 if [ -d /sys/fs/bpf ]; then
29 if ! mountinfo -q /sys/fs/bpf; then
30 # From: https://github.com/cilium/cilium/blob/main/contrib/systemd/sys-fs-bpf.mount
31 # TODO: looking for sys-fs-bpf.mount in init.d
32 mount -t bpf bpffs /sys/fs/bpf || {
33 error "failed to mount bpf filesystem, exiting..."
38 if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup/; then
39 error "cgroup filesystem not mounted, exiting..."
42 if [ ! -d "/tmp/daed/" ]; then
45 if [ ! -L "/var/log/daed" ]; then
46 ln -s "/tmp/daed/" "/var/log/"