mirror of
https://github.com/buildplan/du_setup.git
synced 2025-12-29 16:14:59 +00:00
fixing tailscale config
This commit is contained in:
14
du_setup.sh
14
du_setup.sh
@@ -2068,13 +2068,13 @@ generate_summary() {
|
|||||||
fi
|
fi
|
||||||
local TS_COMMAND=""
|
local TS_COMMAND=""
|
||||||
if command -v tailscale >/dev/null 2>&1; then
|
if command -v tailscale >/dev/null 2>&1; then
|
||||||
if systemctl is-active --quiet tailscaled && tailscale ip >/dev/null 2>&1; then
|
if systemctl is-active --quiet tailscaled && tailscale ip >/dev/null 2>&1; then
|
||||||
local TS_IPS TS_IPV4
|
local TS_IPS TS_IPV4
|
||||||
TS_IPS=$(tailscale ip 2>/dev/null || echo "Unknown")
|
TS_IPS=$(tailscale ip 2>/dev/null || echo "Unknown")
|
||||||
TS_IPV4=$(echo "$TS_IPS" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' | head -1 || echo "Unknown")
|
TS_IPV4=$(echo "$TS_IPS" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' | head -1 || echo "Unknown")
|
||||||
print_success "Service tailscaled is active and connected."
|
print_success "Service tailscaled is active and connected."
|
||||||
echo "$TS_IPS" > /tmp/tailscale_ips.txt
|
echo "$TS_IPS" > /tmp/tailscale_ips.txt
|
||||||
else
|
else
|
||||||
if grep -q "Tailscale connection failed: tailscale up" "$LOG_FILE"; then
|
if grep -q "Tailscale connection failed: tailscale up" "$LOG_FILE"; then
|
||||||
print_error "Service tailscaled is NOT active"
|
print_error "Service tailscaled is NOT active"
|
||||||
FAILED_SERVICES+=("tailscaled")
|
FAILED_SERVICES+=("tailscaled")
|
||||||
|
|||||||
Reference in New Issue
Block a user