diff --git a/Dockerfile b/Dockerfile index f31ad4c..b8c0327 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,13 +77,8 @@ EXPOSE 54925 EXPOSE 54921 EXPOSE 80 -#ADD files/gui/index.php /var/www/html -#ADD files/gui/main.css /var/www/html -#ADD files/api/scan.php /var/www/html -#ADD files/api/active.php /var/www/html -#ADD files/api/list.php /var/www/html -#ADD files/api/download.php /var/www/html -COPY html /var/www/html +# Copy the web files to the web directory +COPY www /var/www RUN chown -R www-data /var/www/ #directory for scans: VOLUME /scans diff --git a/README.md b/README.md index 4aa062f..b32bcb6 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ You can configure the tool via environment variables: | USE_JPEG_COMPRESSION | optional | use JPEG compression when creating PDFs | | TELEGRAM_TOKEN | optional | If TELEGRAM_TOKEN and TELEGRAM_CHATID are set, then this sends notification | | TELEGRAM_CHATID | optional | If TELEGRAM_TOKEN and TELEGRAM_CHATID are set, then this sends notification | +| ALLOW_GUI_FILEOPERATIONS | optional | true/false. Let you delete and rename files in files list | ### FTPS upload diff --git a/docker-compose-example.yml b/docker-compose-example.yml index ba1dc10..7e4b982 100755 --- a/docker-compose-example.yml +++ b/docker-compose-example.yml @@ -28,6 +28,7 @@ services: - OCR_PATH=ocr.php - TELEGRAM_TOKEN="" # note: keep the word bot in the string - TELEGRAM_CHATID=127585497 # note: target chat id. can be person or group + - ALLOW_GUI_FILEOPERATIONS=true restart: unless-stopped # optional, for OCR diff --git a/files/runScanner.sh b/files/runScanner.sh index 7cabf45..5acec40 100755 --- a/files/runScanner.sh +++ b/files/runScanner.sh @@ -55,6 +55,7 @@ echo "-----" echo "setting up webserver:" if [ "$WEBSERVER" == "true" ]; then + echo "starting webserver for API & GUI..." { echo "> /etc/lighttpd/lighttpd.conf + +server.modules += ( "mod_rewrite" ) + +url.rewrite-if-not-file = ( + "^/(.*)$" => "/index.php" +) + +EOL else echo "webserver not configured" fi diff --git a/html/download.php b/html/download.php deleted file mode 100644 index 45da56a..0000000 --- a/html/download.php +++ /dev/null @@ -1,23 +0,0 @@ - \ No newline at end of file diff --git a/html/index.php b/html/index.php deleted file mode 100644 index ee283af..0000000 --- a/html/index.php +++ /dev/null @@ -1,231 +0,0 @@ - - - - -
- -Ready to scan
- - '.$button_file.''); - } - if (!isset($DISABLE_GUI_SCANTOEMAIL) || $DISABLE_GUI_SCANTOEMAIL != true) { - echo(''); - } - if (!isset($DISABLE_GUI_SCANTOIMAGE) || $DISABLE_GUI_SCANTOIMAGE != true) { - echo(''); - } - if (!isset($DISABLE_GUI_SCANTOOCR) || $DISABLE_GUI_SCANTOOCR != true) { - echo(''); - } - ?> -Ready to scan
+ + '.$button_file.''); + } + if (!isset($DISABLE_GUI_SCANTOEMAIL) || $DISABLE_GUI_SCANTOEMAIL != true) { + echo(''); + } + if (!isset($DISABLE_GUI_SCANTOIMAGE) || $DISABLE_GUI_SCANTOIMAGE != true) { + echo(''); + } + if (!isset($DISABLE_GUI_SCANTOOCR) || $DISABLE_GUI_SCANTOOCR != true) { + echo(''); + } + ?> +