Edit Install/Uninstall scripts; Update README.md
Edited Install and Uninstall scripts to handle both at_telnet_daemon and simpleadmin
This commit is contained in:
19
simpleadmin/www/cgi-bin/get_ttl_status
Normal file
19
simpleadmin/www/cgi-bin/get_ttl_status
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check iptables for ttlvalue
|
||||
ttlvalue=$(iptables -t mangle -vnL | grep TTL | awk '{print $13}')
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user