date: 2022-09-22 • category: php • page size: $PLACEHOLDER
To run a PHP daemon worker using Supervisord🡭 as process controller you can create a /etc/supervisor/conf.d/custom-daemon.conf and add the following content:
/etc/supervisor/conf.d/custom-daemon.conf
[program:custom-daemon] process_name=%(program_name)s directort=/var/www/html/custom/directory command=php CustomDaemon.php autostart=true autorestart=true user=daemon redirect_stderr=true stdout_logfile=/var/www/html/logs/supervisord.log
Then you have to restart supervisord service supervisor restart.
service supervisor restart