Skip to content

Commit

Permalink
added model number, multiple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMundhenk committed Oct 28, 2023
1 parent ca2dbac commit b882ee7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion files/api/scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
die("Error: No scanning function selected (try append: ?target=<file|email|image|ocr>)");
}
if (in_array($target, array('file','email','image','ocr'))) {
$output=shell_exec('sudo -u \#'.$_ENV[UID].' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.sh &');
$output=shell_exec('sudo -u \#'.$_ENV[UID].' /opt/brother/scanner/brscan-skey/script/scanto'.$target.'.sh');
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion files/gui/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="main.css">
<title>Brother Scanner</title>
<title>Brother Scanner <?php echo($_ENV["MODEL"]); ?></title>
<?php
if (array_key_exists('RENAME_GUI_SCANTOFILE', $_ENV)) {
$button_file = $_ENV["RENAME_GUI_SCANTOFILE"];
Expand Down
4 changes: 2 additions & 2 deletions files/runScanner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ chmod -R 777 /opt/brother
su - $USERNAME -c "/usr/bin/brsaneconfig4 -a name=$NAME model=$MODEL ip=$IPADDRESS"
su - $USERNAME -c "/usr/bin/brscan-skey"

if [ "$WEBSERVER" == "true" ]
if [ "$WEBSERVER" == "true" ]; then
echo "starting webserver for API & GUI..."
if [[ -z ${PORT} ]]; then
PORT=80
Expand All @@ -25,7 +25,7 @@ if [ "$WEBSERVER" == "true" ]
sed -i "s/server.port\W*= 80/server.port = $PORT/" /etc/lighttpd/lighttpd.conf
/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
echo "webserver started"
}
fi

echo "capabilities:"
scanimage -A
Expand Down

0 comments on commit b882ee7

Please sign in to comment.