|
|
(Next) Troubleshooting |
||||
| |
|||||
|
|||||
Now that we've created an example daemon, it's time to fire it up! I'm going to assume the name of your daemon is logparser. This can be changed with the statement:
<?php
System_Daemon::setOption("appName", "logparser")
?>
Execute Just make your daemon script executable, and then execute it:
chmod a+x ./logparser.php
./logparser.php
Check Your daemon has no way of communicating through your console, so check for messages in:
tail /var/log/logparser.log
ps uf -C logparser.php
Kill Without the start/stop files (see below for howto), you need to:
killall -9 logparser.php
Start / Stop files (Debian & Ubuntu only) Real daemons have an init.d file. Remember you can restart Apache with the following statement?
/etc/init.d/apache2 restart
/etc/init.d/logparser stop
/etc/init.d/logparser start
<?php
$path = System_Daemon::writeAutoRun();
?>
Run on boot Surely you want your daemon to run at system boot.. So on Debian & Ubuntu you could type:
update-rc.d logparser defaults
update-rc.d -f logparser remove
|
|
(Next) Troubleshooting |
||||||||
| |
|||||||||
|
|||||||||