Skip to content

Commit

Permalink
Updated base image to python:slim-bookworm for PHP 8.2 support.
Browse files Browse the repository at this point in the history
Replaced bash calls in PHP scripts with Python.
  • Loading branch information
vgarcia007 committed Nov 4, 2024
1 parent 8b9e29c commit fdf7a2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:slim-bullseye
FROM python:slim-bookworm

RUN <<EOF
apt-get update && \
Expand Down
4 changes: 2 additions & 2 deletions www/private/views/api/scanner-scanto.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function safe_guard_target($target) {
function trigger_script($target, $UID, $method) {

if ($method == 'return') {
popen('sudo -b -u \#'.$UID.' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.sh', 'r');
popen('sudo -b -u \#'.$UID.' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.py', 'r');
json(array('message' => 'Scan triggered','method' => 'post','target' => $target));
} else if ($method == 'wait') {
shell_exec('sudo -u \#'.$UID.' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.sh');
shell_exec('sudo -u \#'.$UID.' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.py');
json(array('message' => 'Scan triggered','method' => 'get','target' => $target));
}
}
Expand Down

0 comments on commit fdf7a2e

Please sign in to comment.