Skip to content

Commit

Permalink
Fix API usage when NAME variable is customized
Browse files Browse the repository at this point in the history
  • Loading branch information
pedropombeiro committed Oct 11, 2024
1 parent 0cb8ebe commit 73a5be4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions files/runScanner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<?php"
Expand Down

0 comments on commit 73a5be4

Please sign in to comment.