#!/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/${SVCNAME#*.}.yml tunnel run ${SVCNAME#*.}" command_background="yes" command_user="${CLOUDFLARED_USER:-cloudflared}:${CLOUDFLARED_GROUP:-cloudflared}" description="Argo Tunnel client" name="Argo Tunnel client" pidfile="/run/${RC_SVCNAME}.pid" required_files="/etc/cloudflared/${SVCNAME#*.}.yml" depend() { need net } status() { ebegin "Showing Cloundflared tunnel status" /usr/bin/cloudflared tunnel info ${SVCNAME#*.} }