From c2e7727bfedbee423c12abb04b399610fc388f4a Mon Sep 17 00:00:00 2001 From: iamromulan <50184035+iamromulan@users.noreply.github.com> Date: Sun, 14 Apr 2024 00:25:00 -0400 Subject: [PATCH] Add echo and cat to sudo www-data -should fix ttl not being set --- simpleadmin/www/cgi-bin/set_ttl | 8 ++++---- simpleupdates/scripts/update_simpleadmin.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/simpleadmin/www/cgi-bin/set_ttl b/simpleadmin/www/cgi-bin/set_ttl index 0ee4959..8ef2124 100644 --- a/simpleadmin/www/cgi-bin/set_ttl +++ b/simpleadmin/www/cgi-bin/set_ttl @@ -34,7 +34,7 @@ if [ -n "${setTTL}" ]; then fi # Echo TTL to file - echo $setTTL > /usrdata/simplefirewall/ttlvalue + /opt/bin/sudo echo $setTTL > /usrdata/simplefirewall/ttlvalue # Set Start Service /opt/bin/sudo /usrdata/simplefirewall/ttl-override start @@ -52,9 +52,9 @@ if [ -z "${ttlvalue}" ]; then ttlenabled=false fi -echo "Content-type: text/json" -echo "" -cat < /opt/etc/sudoers.d/www-data + echo "www-data ALL = (root) NOPASSWD: /usr/sbin/iptables, /usr/sbin/ip6tables, /usrdata/simplefirewall/ttl-override, /bin/echo, /bin/cat" > /opt/etc/sudoers.d/www-data openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \ -subj "/C=US/ST=MI/L=Romulus/O=RMIITools/CN=localhost" \