2 # Copyright 2023 Gentoo Authors
3 # Distributed under the terms of the GNU General Public License v2
5 pidfile="/run/mihomo/mihomo.pid"
6 command="/usr/bin/mihomo"
7 command_args="-d ${MIHOMO_CONF_DIR:-/etc/mihomo}"
8 command_background="yes"
9 command_user="${MIHOMO_USER:-mihomo}:${MIHOMO_GROUP:-mihomo}"
11 capabilities="^cap_net_bind_service,^cap_net_admin,^cap_net_raw"
12 rc_ulimit="${MIHOMO_ULIMIT:--u 500 -n 1048576}"
13 output_log="/var/log/mihomo.log"
14 error_log="/var/log/mihomo.log"
22 checkpath -d -m 0755 -o "$command_user" /run/mihomo
23 checkpath -f -m 0644 -o "$command_user" "$output_log"