Compare commits
2 commits
e4d8479f88
...
6c82523cc8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c82523cc8 | ||
|
|
57f4af07e0 |
2 changed files with 5 additions and 3 deletions
|
|
@ -71,7 +71,7 @@ jobs:
|
||||||
sudo chmod 640 \$DEPLOY_PATH/config/config.php
|
sudo chmod 640 \$DEPLOY_PATH/config/config.php
|
||||||
|
|
||||||
echo 'Nettoyage...'
|
echo 'Nettoyage...'
|
||||||
rm -rf /tmp/web2print-deploy
|
sudo rm -rf /tmp/web2print-deploy
|
||||||
|
|
||||||
echo 'Deploiement termine avec succes!'
|
echo 'Deploiement termine avec succes!'
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,8 @@ class PdfGenerator
|
||||||
$pdfFile = tempnam($this->config['tmp_dir'], 'pdf_') . '.pdf';
|
$pdfFile = tempnam($this->config['tmp_dir'], 'pdf_') . '.pdf';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$cmd = escapeshellcmd($this->config['pagedjs_bin']);
|
$cmd = 'TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' ';
|
||||||
|
$cmd .= escapeshellcmd($this->config['pagedjs_bin']);
|
||||||
$cmd .= ' ' . escapeshellarg($url);
|
$cmd .= ' ' . escapeshellarg($url);
|
||||||
$cmd .= ' -o ' . escapeshellarg($pdfFile);
|
$cmd .= ' -o ' . escapeshellarg($pdfFile);
|
||||||
|
|
||||||
|
|
@ -110,7 +111,8 @@ class PdfGenerator
|
||||||
|
|
||||||
private function buildCommand(string $htmlFile, string $pdfFile, array $options): string
|
private function buildCommand(string $htmlFile, string $pdfFile, array $options): string
|
||||||
{
|
{
|
||||||
$cmd = escapeshellcmd($this->config['pagedjs_bin']);
|
$cmd = 'TMPDIR=' . escapeshellarg($this->config['tmp_dir']) . ' ';
|
||||||
|
$cmd .= escapeshellcmd($this->config['pagedjs_bin']);
|
||||||
$cmd .= ' ' . escapeshellarg($htmlFile);
|
$cmd .= ' ' . escapeshellarg($htmlFile);
|
||||||
$cmd .= ' -o ' . escapeshellarg($pdfFile);
|
$cmd .= ' -o ' . escapeshellarg($pdfFile);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue