L
L
l2p2015-06-29 08:48:16
PHP
l2p, 2015-06-29 08:48:16

How to write script logs via start-stop-daemon?

Hello,
PHP scripts hang in processes, but they don't work themselves. I start them via start-stop-daemon >> $log. Logs are written by start-stop-daemon commands ("already running" and others). How can I redirect the output of a php script to some file as well? I start with parameters --start --background --make-pidfile --exec php script.php.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
3
3vi1_0n3, 2015-06-29
@l2p

In general, everything is correct, as you indicated, and it works.
Try something like --exec "php 1>1.log 2>1.err" script.php. Or something like that. Otherwise, you are redirecting streams not to php, but to start-stop-daemon

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question