Skip to content

The Daemon

Michael Fairchild edited this page Apr 17, 2017 · 4 revisions

SiteMaster requires a background daemon process to handle the queue of pages to scan. The daemon script is located at scripts/daemon.php and can be ran via this command php scripts/daemon.php unique-daemon-name. The unique-daemon-name is optional and defaults to 'default'. To run multiple daemons, simply run the script multiple times, each with its own daemon name.

You can use pm2 as a daemon manager (start on system load and auto-restart the daemon script if it fails). The following is an example for starting the daemon via pm2:

pm2 start scripts/daemon.php --name 'sitemaster2' -l tmp/sitemaster-daemon2.log -- unique-daemon-name

Clone this wiki locally