diff --git a/net-proxy/mihomo/files/mihomo_at.service b/net-proxy/mihomo/files/mihomo_at.service new file mode 100644 index 00000000000..6d1202007aa --- /dev/null +++ b/net-proxy/mihomo/files/mihomo_at.service @@ -0,0 +1,14 @@ +[Unit] +Description=mihomo Daemon for %i. +After=network.target NetworkManager.service systemd-networkd.service iwd.service + +[Service] +Type=exec +User=%i +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE +Restart=on-abort +ExecStart=/usr/bin/mihomo + +[Install] +WantedBy=multi-user.target diff --git a/net-proxy/mihomo/mihomo-1.18.10.ebuild b/net-proxy/mihomo/mihomo-1.18.10-r1.ebuild similarity index 95% rename from net-proxy/mihomo/mihomo-1.18.10.ebuild rename to net-proxy/mihomo/mihomo-1.18.10-r1.ebuild index 608e76cb217..ab1caa730b9 100644 --- a/net-proxy/mihomo/mihomo-1.18.10.ebuild +++ b/net-proxy/mihomo/mihomo-1.18.10-r1.ebuild @@ -59,5 +59,6 @@ src_install() { dobin bin/mihomo dosym -r "/usr/bin/mihomo" "/usr/bin/clash-meta" systemd_dounit "${FILESDIR}/mihomo.service" + systemd_newunit "${FILESDIR}/mihomo_at.service" mihomo@.service newinitd "${FILESDIR}"/mihomo.initd mihomo }