Skip to content

Commit

Permalink
Remove sudo from shell command
Browse files Browse the repository at this point in the history
  • Loading branch information
e-alfred committed Jun 24, 2019
1 parent 9a929d0 commit b2bda9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/PrinterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct($appName, IRequest $request) {
public function printfile($sourcefile, $orientation) {
if($orientation === "landscape") {
$filefullpath = \OC\Files\Filesystem::getLocalFile($sourcefile);
exec('sudo lpr "' . $filefullpath . '"');
exec('lpr "' . $filefullpath . '"');
return new JSONResponse(
array(
'response' => 'success',
Expand All @@ -40,7 +40,7 @@ public function printfile($sourcefile, $orientation) {

if($orientation === "portrait"){
$filefullpath = \OC\Files\Filesystem::getLocalFile($sourcefile);
exec('sudo lpr -o orientation-requested=4 "' . $filefullpath . '"');
exec('lpr -o orientation-requested=4 "' . $filefullpath . '"');
return new JSONResponse(
array(
'response' => 'success',
Expand Down

0 comments on commit b2bda9e

Please sign in to comment.