#!/sbin/openrc-run # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 command="/usr/bin/cloudflared" command_args="${CLOUDFLARED_OPTS} --no-autoupdate --config /etc/cloudflared/config.yml tunnel run" command_background="yes" command_user="${CLOUDFLARED_USER:-cloudflared}:${CLOUDFLARED_GROUP:-cloudflared}" description="Cloudflare Tunnel client" name="Cloudflare Tunnel client" pidfile="/run/${RC_SVCNAME}.pid" required_files="/etc/cloudflared/config.yml" retry=SIGTERM/30/SIGKILL/10 depend() { need net after firewall } status() { ebegin "Showing Cloundflared tunnel status" /usr/bin/cloudflared tunnel info }