Skip to content

Commit

Permalink
Merge pull request #58 from PhilippMundhenk/fix_custom_NAME
Browse files Browse the repository at this point in the history
Fix API usage when NAME variable is customized
  • Loading branch information
PhilippMundhenk authored Oct 20, 2024
2 parents 8f2f03f + 5baaf97 commit d7d0d10
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 d7d0d10

Please sign in to comment.