eeupdate64e.efi /nic=1 /d=FXVL_125C_V_1MB_2.32.bin#!/bin/sh
SOCKET=/var/run/dpinger_INTERFACE_NAME.sock
WIREGUARD_ID=ad78e2ad-7ed9-422d-a0b9-ee7ed2795a3
RES=$(cat $SOCKET |cut -d ' ' -f2-)
DT=$(date +"%Y-%m-%d %H:%M:%S %z")
if [[ "$RES" == "0 0 100" ]]; then
echo -n "[$DT] "
/usr/local/sbin/pluginctl -s wireguard restart $WIREGUARD_ID
# If you don't use or want gotify notifications delete the following lines (except the fi)
TOKEN="$(cat ~/.config/gotify/cli.json |jq -r .token)"
URL="$(cat ~/.config/gotify/cli.json |jq -r .url)"
TITLE="check-wg ($(hostname -s))"
TEXT="Wireguard restarted"
curl -m 10 -so /dev/null -X POST "${URL}/message?token=$TOKEN" -F "title=$TITLE" -F "message=$TEXT"
fi
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
REQUESTS_CA_BUNDLE=/usr/local/etc/ssl/cert.pem
*/5 * * * * root /root/bin/check-wg.sh >>/var/log/check-wg.log