Pipe between two daemons?
I have a script that must remain in php and run as a service and another script that must remain in python and run as a service. I need the first script to send data to the second script.
I have achieved this by echoing the data out of the first script so it gets sent to stdout and using a pipe to send it to the second script that listens to stdin and responds to the data as it receives it. This works great when I call the scripts from the shell as: Code:
script1.php | script2.py I have also tried to send the data from script1 to a named pipe where script2 reads from the same named pipe. Again, works great until I try to daemonize the process. Distro is Arch and this also cannot be changed. Any help is appreciated. |
(probably) You can have bidirectional communication between two python processes and you can fork that php task in one of them (which will inherit sockets).
|
I got it working by running the commands via sh in the systemd service files.
|
All times are GMT -5. The time now is 06:10 AM. |