Files
Nebula-Ansible-Role/templates/nebula-check.sh.j2
2026-04-12 18:51:56 +02:00

8 lines
321 B
Django/Jinja

#!/bin/bash
PATH=/usr/bin:/bin:/sbin:/usr/sbin
test="$(ping -q -w10 -W2 {{ _nebula_lighthouses_computed[0].internal_ip }} 2>/dev/null | grep -oP '\d{1,3}(?=%)')"
if [ "$test" == "100" ]; then
logger -s -p user.emerg '!!! Unable to reach Nebula server. Bouncing tunnel neb0... !!!'
systemctl restart nebula.service
fi