Restore new version of ttl cgi

This commit is contained in:
iamromulan
2024-05-05 04:56:12 -04:00
parent 88afb00cb7
commit 2bea6efdf1
4 changed files with 93 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Check iptables for ttlvalue
ttlvalue=$(iptables -t mangle -vnL | awk '/TTL/ {print $13; exit}')
ttlenabled=true;
# Set Variables
if [ -z "${ttlvalue}" ]; then
ttlvalue=0
ttlenabled=false
fi
echo "Content-type: text/json"
echo ""
cat <<EOT
{
"isEnabled": $ttlenabled,
"ttl": $ttlvalue
}
EOT