I'm using task spooler to run a process on my server. Is there a way I can check the logs via ssh? It seems that the commands are run by user/session, so I when ssh via terminal, I don't see anything that was run by the server.
- An API call to a PHP file
- PHP files executes the bash script
...
$command = 'sh ./generate.sh "' . $url_to_capture . '" "' . $thumbnail_to_create . '" "' . $webpage_size . '" "' . $screenshot_size . '" "' . $slide_full_path . '" "' . $image_format . '" "' . $slides . '"';
exec($command, $output, $result_code);
...
#!/bin/bash
url_to_capture=$1
thumbnail_to_create=$2
webpage_size=$3
screenshot_size=$4
slide_full_path=$5
image_format=$6
slides=$7
tsp decktape reveal "$url_to_capture" "$thumbnail_to_create" --screenshots --size="$webpage_size" --screenshot_size="$screenshot_size" --screenshots-directory="$slide_full_path" --screenshots-format="$image_format" --slides="$slides" --chrome-arg=--no-sandbox --page-load-timeout=60000 --buffer-timeout=60000
I've installed mpm-itk to run the vhost as ubuntu (AssignUserId ubuntu ubuntu
) but I still cannot see any logs via tsp when I ssh.
I know the script is executing and can check it via ps -aux
ubuntu 45670 0.0 0.0 2832 100 ? Ss 10:54 0:00
but when I type tsp
, I have an empty list;
ID State Output E-Level Times(r/u/s) Command [run=0/5]
If I run the command directly on terminal;
sh ./generate.sh "{url}" "{name}" "603x339" "603x339" "{path}" "jpg" "1"
tsp
ID State Output E-Level Times(r/u/s) Command [run=1/5]
2 running /tmp/ts-out.JXy3oe decktape reveal {url} {name} --screenshots --size=603x339 --screenshot_size=603x339 --screenshots-directory=/{path} --screenshots-format=jpg --slides=1 --chrome-arg=--no-sandbox --page-load-timeout=60000 --buffer-timeout=60000