Files
ansible-collection/roles/xray-lists/files/update.sh
T
2026-10-02 21:34:01 +04:00

17 lines
362 B
Bash

#!/bin/sh
set -eu
state=/var/lib/xray-lists
out=$(/opt/xray-lists/venv/bin/xray-lists --config /etc/xray-lists/config.yaml)
echo "$out"
if echo "$out" | grep -A 10 "changed:" | grep -q "nftsets.conf"; then
touch "$state/.reload-dnsmasq"
fi
if echo "$out" | grep -A 10 "changed:" | grep -q "\.elements\.nft"; then
touch "$state/.reload-nft"
fi
exit 0