cloudflared tunnel run
#!/bin/sh. /etc/rc.subrname="argotunnel"rcvar="argotunnel_enable"argotunnel_user="root"argotunnel_command="cloudflared tunnel --config /root/.cloudflared/config.yml run"pidfile="/var/run/${name}.pid"command="/usr/sbin/daemon"command_args="-P ${pidfile} -r -f ${argotunnel_command}"load_rc_config $name: ${argotunnel_enable:=no}run_rc_command "$1"
argotunnel_enable='YES'
service argotunnel start
ps auxroot 45253 0.0 0.0 1066812 2508 - Ss 16:03 0:00.00 daemon: cloudflared[62627] (daemon)
#!/bin/sh. /etc/rc.subrname="argotunnel"rcvar="argotunnel_enable"argotunnel_flags="tunnel --config /root/.cloudflared/config.yml"command_args="run"command="/usr/local/bin/cloudflared"load_rc_config $namerun_rc_command "$1"
#!/bin/bashSERVICE="cloudflared"if pgrep -x "$SERVICE" >/dev/nullthen echo "$SERVICE is running"else echo "$SERVICE stopped" /usr/sbin/daemon /etc/rc.d/argotunnel startfi
[start]command:/bin/sh /root/.cloudflared/automatic_restart.shparametes:type:scriptmessage:starting cloudflared if necessarydescription:Check and restart cloudflared
service configd restart