From 5baaf97231ab7c8254638e645d8d3184989b134a Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Fri, 11 Oct 2024 18:21:26 +0200 Subject: [PATCH] Fix API usage when NAME variable is customized --- Dockerfile | 4 +--- files/runScanner.sh | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99432fe..84d95a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,14 +43,12 @@ cp /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/ cp /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/ && \ mkdir -p /var/run/lighttpd && \ touch /var/run/lighttpd/php-fastcgi.socket && \ -chown -R www-data /var/run/lighttpd && \ -echo 'www-data ALL=(NAS) NOPASSWD:ALL' >> /etc/sudoers +chown -R www-data /var/run/lighttpd EOF ENV NAME="Scanner" ENV MODEL="MFC-L2700DW" ENV IPADDRESS="192.168.1.123" -ENV USERNAME="NAS" ENV REMOVE_BLANK_THRESHOLD="0.3" # Only set these variables in the compose file, if inotify needs to be triggered (e.g., for Synology Drive): diff --git a/files/runScanner.sh b/files/runScanner.sh index 7cabf45..6ed2e03 100755 --- a/files/runScanner.sh +++ b/files/runScanner.sh @@ -55,6 +55,8 @@ echo "-----" echo "setting up webserver:" if [ "$WEBSERVER" == "true" ]; then + echo "www-data ALL=($NAME) NOPASSWD:ALL" >>/etc/sudoers + echo "starting webserver for API & GUI..." { echo "