Commit d3cbda79 authored by Michael Fairchild's avatar Michael Fairchild
Browse files

Just use a shell script, bypass php

parent caff375e
......@@ -9,7 +9,8 @@ respawn
respawn limit 15 5
script
#configure the path
exec php /var/www/html/scripts/bus-daemon.php >> /var/log/bus_daemon.log 2>&1
exec while true; do php /var/www/html/maps/www/busproxy.php; sleep 1; done
end script
post-start script
# Optionally put a script here that will notify you node has (re)started
......
<?php
/**
* This daemon runs the bus proxy script every second to generate the json file.
* This is helpful for when the server is under heavy load to ensure that the script is only ever ran once every second.
*
* If you use this daemon, be sure that busproxy.php is aliased in apache to serve bus.json.
*/
$project_root = dirname(__DIR__);
while(true) {
$result = shell_exec("php $project_root/www/busproxy.php");
sleep(1);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment