Remove sudo from shell command
This commit is contained in:
parent
9a929d0c20
commit
b2bda9ef60
|
@ -29,7 +29,7 @@ class PrinterController extends Controller {
|
|||
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',
|
||||
|
@ -40,7 +40,7 @@ class PrinterController extends Controller {
|
|||
|
||||
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',
|
||||
|
|
Loading…
Reference in a new issue