Not everything needs sudo in set_ttl
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PATH=/bin:/usr/sbin:/usr/bin:/sbin:/opt/sbin:/opt/bin:/usrdata/root/bin
|
PATH=/bin:/usr/sbin:/usr/bin:/sbin:/opt/sbin:/opt/bin:/usrdata/root/bin
|
||||||
# Get query
|
# 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
|
if [ "${QUERY_STRING}" ]; then
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ if [ -n "${setTTL}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Echo TTL to file
|
# Echo TTL to file
|
||||||
/opt/bin/sudo echo $setTTL > /usrdata/simplefirewall/ttlvalue
|
echo $setTTL > /usrdata/simplefirewall/ttlvalue
|
||||||
|
|
||||||
# Set Start Service
|
# Set Start Service
|
||||||
/opt/bin/sudo /usrdata/simplefirewall/ttl-override start
|
/opt/bin/sudo /usrdata/simplefirewall/ttl-override start
|
||||||
@@ -54,7 +54,7 @@ fi
|
|||||||
|
|
||||||
echo "Content-type: text/json"
|
echo "Content-type: text/json"
|
||||||
echo ""
|
echo ""
|
||||||
/opt/bin/sudo cat <<EOT
|
cat <<EOT
|
||||||
{
|
{
|
||||||
"isEnabled": $ttlenabled,
|
"isEnabled": $ttlenabled,
|
||||||
"ttl": $ttlvalue
|
"ttl": $ttlvalue
|
||||||
|
|||||||
Reference in New Issue
Block a user