Merge pull request #33 from snowzach/snowzach_ttl_fixes

Not everything needs sudo in set_ttl
This commit is contained in:
Cameron Thompson
2024-04-16 08:27:29 -04:00
committed by GitHub

View File

@@ -1,7 +1,7 @@
#!/bin/bash
PATH=/bin:/usr/sbin:/usr/bin:/sbin:/opt/sbin:/opt/bin:/usrdata/root/bin
# Get query
QUERY_STRING=$(/opt/bin/sudo echo "${QUERY_STRING}" | sed 's/;//g')
QUERY_STRING=$(echo "${QUERY_STRING}" | sed 's/;//g')
if [ "${QUERY_STRING}" ]; then
@@ -34,7 +34,7 @@ if [ -n "${setTTL}" ]; then
fi
# Echo TTL to file
/opt/bin/sudo echo $setTTL > /usrdata/simplefirewall/ttlvalue
echo $setTTL > /usrdata/simplefirewall/ttlvalue
# Set Start Service
/opt/bin/sudo /usrdata/simplefirewall/ttl-override start
@@ -54,7 +54,7 @@ fi
echo "Content-type: text/json"
echo ""
/opt/bin/sudo cat <<EOT
cat <<EOT
{
"isEnabled": $ttlenabled,
"ttl": $ttlvalue