#!/bin/bash
#
source /etc/default/tailscaled
#
/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${PORT} $FLAGS
#
#/usr/bin/tailscale funnel reset
#
#/usr/bin/tailscale funnel --bg --https=443 localhost:80
#
/usr/bin/tailscale funnel --bg --https=8443 localhost:1080
#
/usr/bin/tailscale funnel status
#
#if  ifconfig -a | grep -q 'wlan0'; then
#    echo "Esta Tudo ok com WIFI!!"
#else
#    echo "Reiniciando o WIFI ok!!"
#    /usr/sbin/usb_modeswitch -KW -v 0bda -p 1a2b
#fi
#
#sleep 10
#
#if ! /usr/bin/systemctl status nmbd smbd | grep -q 'failed'; then 
#    echo "Esta Tudo ok com Samba!!"
#else
#    echo "Reiniciando o Samba ok!!"
#    /usr/bin/systemctl restart nmbd smbd
#fi
#
#sleep 10
#
#curl -s http://radiom7b.dyndns.org:1010 -o /tmp/log.txt
#
#if  grep -q 'A Radio #1 do BR' /tmp/log.txt; then
#    echo "Esta Tudo ok com EzStream!!"
#else
#    echo "Reiniciando o EzStream ok!!"
#    /usr/bin/systemctl restart ezstream
#fi
#
