remove ia64 keywords
[gentoo-zh.git] / net-proxy / mihomo / files / mihomo.initd
blob12403027b3f0d8224416cd0705cc1ba141f06cc8
1 #!/sbin/openrc-run
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"
16 depend() {
17     need net
18     after local
21 start_pre() {
22     checkpath -d -m 0755 -o "$command_user" /run/mihomo
23     checkpath -f -m 0644 -o "$command_user" "$output_log"